/* /styles/callout.css */
/* Callout modal component styles - COMPLETE FILE with repeat functionality and RAID DAY STYLING */

/* Modal Overlay */
.callout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Container - UPDATED WIDTH */
.callout-modal {
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
    border: 2px solid var(--bg-primary);
    border-radius: 24px;
    padding: 2rem;
    width: 35vw; /* UPDATED: Increased from default */
    max-width: 650px; /* UPDATED: Increased max width */
    min-width: 450px; /* UPDATED: Ensure minimum width */
    position: relative;
    box-shadow: 
        20px 20px 40px rgba(0, 0, 0, 0.6),
        -20px -20px 40px rgba(51, 65, 85, 0.1);
    animation: slideIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Close Button */
.callout-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(145deg, var(--bg-tertiary), var(--bg-secondary));
    border: 1px solid var(--border-blue);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

.callout-close-btn:hover {
    background: linear-gradient(145deg, var(--bg-tertiary), var(--blue-primary));
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Modal Header */
.callout-modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.callout-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blue-accent);
    margin-bottom: 0.5rem;
}

.callout-modal-date {
    color: #9ca3af;
    font-size: 1rem;
}

/* Existing Callout Display */
.callout-existing {
    margin-bottom: 2rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 300px;
        transform: translateY(0);
    }
}

.callout-existing-card {
    background: linear-gradient(145deg, var(--bg-tertiary), var(--bg-secondary));
    border: 2px solid var(--border-blue);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.callout-existing-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.callout-existing-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.callout-existing-info {
    flex: 1;
}

.callout-existing-status {
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    margin-bottom: 0.25rem;
}

.callout-existing-reason {
    color: #9ca3af;
    font-size: 0.9rem;
    line-height: 1.3;
}

.callout-existing-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.callout-edit-btn,
.callout-change-status-btn {
    background: linear-gradient(145deg, var(--blue-primary), var(--blue-secondary));
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 100px;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.3);
}

.callout-edit-btn:hover,
.callout-change-status-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.callout-change-status-btn {
    background: linear-gradient(145deg, var(--status-late-primary), var(--status-late-secondary));
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.3);
}

.callout-change-status-btn:hover {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.callout-delete-btn {
    background: linear-gradient(145deg, var(--status-out-primary), var(--status-out-secondary));
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 100px;
    box-shadow: 0 3px 8px rgba(220, 38, 38, 0.3);
}

.callout-delete-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* Form Styles */
.callout-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.callout-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.callout-form-label {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.callout-required {
    color: var(--status-out-primary);
}

/* Checkbox styling for repeat callout */
.callout-repeat-checkbox {
    margin-right: 8px;
    accent-color: var(--blue-primary);
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* Status Dropdown */
.callout-status-dropdown {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border: 1px solid var(--border-blue);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.callout-status-dropdown:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.callout-status-dropdown:hover {
    border-color: var(--blue-accent);
}

.callout-status-dropdown option {
    background: var(--bg-secondary);
    color: white;
}

/* Delay Input (appears when LATE is selected) */
.callout-delay-group {
    display: none;
    animation: slideDown 0.3s ease;
}

.callout-delay-group.visible {
    display: flex;
}

.callout-delay-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.callout-delay-input {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border: 1px solid var(--border-blue);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    width: 100px;
    text-align: center;
    transition: all 0.2s ease;
}

.callout-delay-input:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.callout-delay-label {
    color: #9ca3af;
    font-size: 0.9rem;
}

.callout-delay-limit {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* REPEAT CALLOUT OPTIONS - ENHANCED WITH RAID DAY STYLING */
.callout-repeat-options {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border: 1px solid var(--border-blue);
    border-radius: 12px;
    margin-top: 1rem;
    animation: slideDown 0.3s ease;
}

/* RAID DAY INFO STYLING */
.raid-day-info {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.raid-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    color: #e2e8f0;
}

.raid-info-icon {
    font-size: 16px;
    color: #60a5fa;
}

.raid-info-text {
    font-size: 14px;
    font-weight: 500;
}

.raid-info-note {
    font-size: 12px;
    color: #94a3b8;
    font-style: italic;
}

/* Days of week selector - ENHANCED with raid day distinction */
.callout-days-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.1);
}

/* Base styling for all day options */
.callout-day-option {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(51, 65, 85, 0.3);
    position: relative;
}

/* RAID DAY STYLING - Bright and enabled */
.callout-day-option.raid-day {
    background: linear-gradient(145deg, #334155, #475569);
    border: 2px solid rgba(59, 130, 246, 0.3);
    color: #e2e8f0;
    cursor: pointer;
}

.callout-day-option.raid-day:hover {
    background: linear-gradient(145deg, #475569, #64748b);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
}

.callout-day-option.raid-day input[type="checkbox"] {
    cursor: pointer;
    accent-color: var(--blue-primary);
}

.callout-day-option.raid-day input[type="checkbox"]:checked + span {
    color: var(--blue-accent);
    font-weight: 600;
}

/* NON-RAID DAY STYLING - Greyed out and disabled */
.callout-day-option.non-raid-day {
    background: linear-gradient(145deg, #0f172a, #1e293b);
    border: 2px solid #0f172a;
    color: #64748b;
    opacity: 0.6;
    cursor: not-allowed;
}

.callout-day-option.non-raid-day:hover {
    /* Prevent hover effects on disabled days */
    background: linear-gradient(145deg, #0f172a, #1e293b);
    border-color: #0f172a;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.callout-day-option.non-raid-day input[type="checkbox"] {
    cursor: not-allowed;
    opacity: 0.5;
}

.callout-day-option.non-raid-day span {
    color: #64748b;
    font-weight: normal;
}

/* General checkbox styling */
.callout-day-option input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* Repeat summary styling */
.callout-repeat-summary {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.repeat-summary-content {
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.4;
}

.repeat-summary-content.valid {
    border-left: 4px solid #10b981;
    padding-left: 12px;
}

.repeat-summary-content.invalid {
    border-left: 4px solid #ef4444;
    padding-left: 12px;
}

.validation-warning {
    color: #fca5a5;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 4px;
    padding: 4px 8px;
    margin-top: 8px;
    display: inline-block;
}

/* Reason instructions */
.callout-reason-instructions {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    font-style: italic;
    padding: 0.5rem;
    background: rgba(30, 41, 59, 0.2);
    border-radius: 4px;
    border-left: 3px solid var(--blue-primary);
}

/* Reason Textarea */
.callout-reason-textarea {
    background: linear-gradient(145deg, var(--bg-primary), var(--bg-secondary));
    border: 1px solid var(--border-blue);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    max-height: 200px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.callout-reason-textarea:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.callout-reason-textarea:read-only {
    background: linear-gradient(145deg, var(--bg-tertiary), var(--bg-secondary));
    border-color: rgba(34, 197, 94, 0.3);
    color: #d1d5db;
}

.callout-reason-textarea::placeholder {
    color: #6b7280;
}

/* Action Buttons */
.callout-action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.callout-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.callout-btn-primary {
    background: linear-gradient(145deg, var(--blue-primary), var(--blue-secondary));
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.callout-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.callout-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.callout-btn-secondary {
    background: linear-gradient(145deg, var(--bg-tertiary), var(--bg-secondary));
    color: white;
    border: 1px solid var(--border-blue);
}

.callout-btn-secondary:hover {
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
    transform: translateY(-2px);
}

.callout-btn-danger {
    background: linear-gradient(145deg, var(--status-out-primary), var(--status-out-secondary));
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.callout-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

/* Error Messages */
.callout-error-message {
    background: linear-gradient(145deg, var(--status-out-secondary), var(--status-out-primary));
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.callout-error-message.visible {
    display: block;
    animation: slideDown 0.3s ease;
}

/* Enhanced validation error styling for raid days */
.callout-error-message.raid-day-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    padding: 8px 12px;
    color: #fca5a5;
}

/* STATUS CHANGE PROMPT STYLES */
.callout-status-change-prompt {
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
    border: 2px solid var(--border-blue);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    animation: slideDown 0.3s ease;
}

.callout-prompt-header h4 {
    color: var(--blue-accent);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
}

.callout-prompt-group {
    margin-bottom: 1.5rem;
}

.callout-prompt-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.callout-prompt-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.callout-prompt-error[style*="block"] {
    display: block !important;
}

/* CONFLICT RESOLUTION MODAL STYLES */
.conflict-modal {
    background: linear-gradient(145deg, #1e293b, #0f172a);
    border: 2px solid #0f172a;
    border-radius: 24px;
    padding: 2rem;
    max-width: 600px;
    width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 20px 20px 40px rgba(0, 0, 0, 0.6);
}

.conflict-header {
    text-align: center;
    margin-bottom: 2rem;
}

.conflict-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 0.5rem;
}

.conflict-subtitle {
    color: #9ca3af;
    font-size: 1rem;
}

.conflict-info {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    color: #fbbf24;
    font-size: 0.9rem;
}

.conflicts-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.conflict-item {
    background: linear-gradient(145deg, #334155, #1e293b);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
}

.conflict-date {
    font-weight: 600;
    font-size: 1.1rem;
    color: #60a5fa;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.existing-callout {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #ef4444;
}

.existing-callout.late {
    border-left-color: #f59e0b;
}

.existing-label {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.existing-status {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.existing-status.late { color: #fbbf24; }
.existing-status.out { color: #ef4444; }

.existing-reason {
    color: #d1d5db;
    font-size: 0.9rem;
}

.new-callout {
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #10b981;
}

.new-label {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.new-status {
    font-weight: 600;
    color: #34d399;
    margin-bottom: 0.25rem;
}

.new-reason {
    color: #d1d5db;
    font-size: 0.9rem;
}

.conflict-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 120px;
    border: 2px solid transparent;
}

.btn-keep {
    background: linear-gradient(145deg, #6b7280, #4b5563);
    color: white;
}

.btn-keep:hover {
    background: linear-gradient(145deg, #9ca3af, #6b7280);
    transform: translateY(-1px);
}

.btn-keep.selected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.2);
}

.btn-replace {
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    color: white;
}

.btn-replace:hover {
    background: linear-gradient(145deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
}

.btn-replace.selected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.2);
}

.btn-skip {
    background: linear-gradient(145deg, #dc2626, #991b1b);
    color: white;
}

.btn-skip:hover {
    background: linear-gradient(145deg, #ef4444, #dc2626);
    transform: translateY(-1px);
}

.btn-skip.selected {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.2);
}

.summary {
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    text-align: center;
}

.summary-text {
    color: #9ca3af;
    margin-bottom: 1rem;
}

.summary-counts {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
}

.count-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.count-number {
    font-size: 1.5rem;
    font-weight: 700;
}

.count-new { color: #34d399; }
.count-replace { color: #60a5fa; }
.count-skip { color: #ef4444; }

.count-label {
    font-size: 0.8rem;
    color: #9ca3af;
    text-transform: uppercase;
}

.final-actions {
    display: flex;
    gap: 1rem;
}

.final-btn {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.final-cancel {
    background: linear-gradient(145deg, #6b7280, #4b5563);
    color: white;
}

.final-cancel:hover {
    transform: translateY(-2px);
}

.final-proceed {
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    color: white;
}

.final-proceed:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Calendar Integration - Callout Found Button */
.add-btn.callout-exists {
    background: linear-gradient(145deg, var(--status-late-primary), var(--status-late-secondary));
    width: auto;
    height: auto;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.add-btn.callout-exists:hover {
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .callout-modal {
        width: 45vw;
    }
}

@media (max-width: 900px) {
    .callout-modal {
        width: 55vw;
    }
    
    .callout-days-selector {
        justify-content: flex-start;
        gap: 8px;
    }
}

@media (max-width: 768px) {
    .callout-modal {
        width: 90vw;
        min-width: 320px;
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .callout-existing-actions {
        flex-direction: column;
    }
    
    .callout-edit-btn,
    .callout-change-status-btn,
    .callout-delete-btn {
        min-width: auto;
    }
    
    .callout-action-buttons {
        flex-direction: column;
    }
    
    .callout-days-selector {
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
    }
    
    .callout-day-option {
        font-size: 12px;
        padding: 6px 10px;
        min-width: 80px;
        justify-content: center;
    }
    
    .callout-repeat-options {
        padding: 1rem;
    }
    
    /* Conflict resolution responsive */
    .conflict-modal {
        width: 95vw;
        padding: 1.5rem;
    }
    
    .conflict-actions {
        flex-direction: column;
    }
    
    .action-btn {
        min-width: auto;
        margin-bottom: 0.5rem;
    }
    
    .summary-counts {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .count-item {
        flex-direction: row;
        justify-content: space-between;
    }
}

@media (max-width: 600px) {
    .callout-modal {
        width: 95vw;
        min-width: 300px;
    }
    
    .callout-days-selector {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .callout-day-option {
        justify-content: flex-start;
    }
    
    .conflict-modal {
        width: 98vw;
        padding: 1rem;
    }
}