/**
 * Group Invitations Modal Styling
 * Matches the nostalgic 2007 aesthetic of the site
 */

.invitation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

.invitation-modal {
    background: linear-gradient(145deg, #f0f8ff, #e6f3ff);
    border: 2px solid #4a90e2;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    font-family: 'Trebuchet MS', Arial, sans-serif;
}

.modal-header {
    background: linear-gradient(145deg, #4a90e2, #357abd);
    color: white;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    font-weight: bold;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 20px;
    background: white;
    border-radius: 0 0 10px 10px;
}

.invite-user-info {
    background: linear-gradient(145deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.invite-user-info p {
    margin: 0;
    color: #856404;
    font-weight: bold;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
    color: #333;
    font-size: 14px;
}

.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.modal-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(145deg, #4a90e2, #357abd);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(145deg, #357abd, #2968a3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    color: #495057;
    border: 1px solid #ced4da;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-status {
    margin-top: 15px;
    min-height: 20px;
}

.status-message {
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: bold;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
}

.status-success {
    background: linear-gradient(145deg, #d4edda, #c3e6cb);
    color: #155724;
    border: 1px solid #28a745;
}

.status-error {
    background: linear-gradient(145deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border: 1px solid #dc3545;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive design */
@media (max-width: 600px) {
    .invitation-modal {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 12px 15px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* Integration with existing site styles */
.invitation-modal * {
    box-sizing: border-box;
}

/* Add some nostalgic 2007 flair */
.invitation-modal {
    background: 
        radial-gradient(circle at 20% 20%, rgba(74, 144, 226, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 193, 7, 0.1) 0%, transparent 50%),
        linear-gradient(145deg, #f0f8ff, #e6f3ff);
}

/* ========== Dark Mode ========== */
body.theme-dark .invitation-modal-overlay .invitation-modal {
    background: 
        radial-gradient(circle at 20% 20%, rgba(29, 78, 216, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        linear-gradient(145deg, #1f2937, #111827);
    border-color: #374151;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

body.theme-dark .invitation-modal .modal-header {
    background: linear-gradient(145deg, #1d4ed8, #1e40af);
}

body.theme-dark .invitation-modal .modal-close {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

body.theme-dark .invitation-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

body.theme-dark .invitation-modal .modal-body {
    background: #111827;
    color: #e5e7eb;
}

body.theme-dark .invitation-modal .invite-user-info {
    background: linear-gradient(145deg, #1e3a5f, #1a2744);
    border-color: #2563eb;
}

body.theme-dark .invitation-modal .invite-user-info p {
    color: #93c5fd;
}

body.theme-dark .invitation-modal .form-group label {
    color: #d1d5db;
}

body.theme-dark .invitation-modal .form-group select,
body.theme-dark .invitation-modal .form-group textarea {
    background: #1f2937;
    border: 2px solid #374151;
    color: #e5e7eb;
}

body.theme-dark .invitation-modal .form-group select:focus,
body.theme-dark .invitation-modal .form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 5px rgba(37, 99, 235, 0.4);
}

body.theme-dark .invitation-modal .form-group textarea::placeholder {
    color: #6b7280;
}

body.theme-dark .invitation-modal .modal-actions {
    border-top-color: #374151;
}

body.theme-dark .invitation-modal .btn-primary {
    background: linear-gradient(145deg, #1d4ed8, #1e40af);
    color: #fff;
}

body.theme-dark .invitation-modal .btn-primary:hover:not(:disabled) {
    background: linear-gradient(145deg, #1e40af, #1e3a8a);
}

body.theme-dark .invitation-modal .btn-primary:disabled {
    background: #374151;
    color: #6b7280;
}

body.theme-dark .invitation-modal .btn-secondary {
    background: linear-gradient(145deg, #1f2937, #111827);
    color: #d1d5db;
    border: 1px solid #374151;
}

body.theme-dark .invitation-modal .btn-secondary:hover {
    background: linear-gradient(145deg, #374151, #1f2937);
    color: #f9fafb;
}

body.theme-dark .invitation-modal .status-success {
    background: linear-gradient(145deg, #064e3b, #065f46);
    color: #6ee7b7;
    border-color: #059669;
}

body.theme-dark .invitation-modal .status-error {
    background: linear-gradient(145deg, #7f1d1d, #991b1b);
    color: #fca5a5;
    border-color: #dc2626;
}
