/* Invitation System Styles */

/* Header Navigation */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: var(--text-primary);
    border-radius: 8px;
    transition: all 0.2s;
    position: relative;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: var(--primary-muted);
    color: var(--primary);
}

.nav-icon {
    font-size: 1.2rem;
}

.nav-text {
    font-weight: 500;
}

.nav-link .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--error);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Invite Button */
.btn-invite {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-invite:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Invite Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--modal-overlay, rgba(0, 0, 0, 0.5));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-surface, #1e1e2e);
    color: var(--text-primary, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 20px 60px var(--shadow-color, rgba(0, 0, 0, 0.3));
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.invite-modal {
    max-width: 700px;
    background: var(--bg-surface, #1e1e2e);
    color: var(--text-primary, #e2e8f0);
}

.invite-modal .modal-header h2 {
    color: var(--text-primary, #e2e8f0);
}

.invite-modal .modal-body {
    background: var(--bg-surface, #1e1e2e);
    color: var(--text-primary, #e2e8f0);
}

.invite-modal .form-group label {
    color: var(--text-primary, #e2e8f0);
}

.invite-modal .instructions {
    color: var(--text-secondary, #94a3b8);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.btn-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-close:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.instructions {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.instructions strong {
    color: var(--primary);
}

.invite-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.input-title {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--bg-secondary, #0f0f1a);
    color: var(--text-primary, #e2e8f0);
}

.input-title:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-muted);
}

.btn-submit-invite {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-submit-invite:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-color, rgba(37, 99, 235, 0.3));
}

.btn-submit-invite:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-surface);
    border-color: var(--secondary);
}

/* Success/Error Messages */
.success-message {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.success-message p {
    margin: 0.5rem 0;
    color: #065f46;
}

.success-message p:first-child {
    font-size: 1.2rem;
    font-weight: 600;
}

.success-message .hint {
    font-size: 0.9rem;
    color: #047857;
}

.error-message {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 1rem;
    color: var(--error);
    margin-bottom: 1rem;
}

/* Invitations Page */
.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0;
    font-size: 2rem;
}

.auth-required {
    text-align: center;
    padding: 3rem 1rem;
}

.auth-required p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.btn-login {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-login:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow-color, rgba(37, 99, 235, 0.3));
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-secondary);
}

.empty-state p {
    margin: 0.5rem 0;
}

.empty-state .hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.invitations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.invitation-item {
    background: var(--bg-surface, #1e1e2e);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.invitation-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--shadow-color, rgba(37, 99, 235, 0.1));
    transform: translateY(-2px);
}

.invitation-item.unread {
    background: var(--bg-surface-hover, rgba(99, 102, 241, 0.15));
    border-color: var(--primary, #6366f1);
}

.invitation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.inviter-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.unread-badge {
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.invitation-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.talk-title {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 500;
}

.invitation-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-nav {
        gap: 0.5rem;
    }
    
    .nav-text {
        display: none;
    }
    
    .nav-link {
        padding: 0.5rem;
    }
    
    .modal-content {
        margin: 0.5rem;
    }
    
    .invite-modal {
        max-width: 100%;
    }
}
