/**
 * Sessions Modal Styles
 * 
 * Styles for the multi-session management modal
 */

/* Modal Overlay */
.sessions-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sessions-modal.open {
    opacity: 1;
}

/* Modal Content */
.sessions-modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    width: 90%;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Modal Header */
.sessions-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.sessions-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    flex: 1;
}

.sessions-modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.sessions-modal-close-btn:hover {
    color: #333;
}

/* Warning Banner */
.sessions-modal-warning {
    padding: 1rem 1.5rem;
    background: #fff3cd;
    border-bottom: 1px solid #ffc107;
    color: #856404;
    font-size: 0.9rem;
}

.sessions-modal-warning strong {
    font-weight: 600;
}

/* Modal Body */
.sessions-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* Sessions List */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sessions-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
    font-size: 1.1rem;
}

/* Session Card */
.session-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.25rem;
    background: #fff;
    transition: all 0.2s ease;
}

.session-card:hover {
    border-color: #bbb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.session-card.active {
    border-color: #4CAF50;
    background: #f1f8f4;
}

/* Session Card Header */
.session-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.session-name-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.session-name-input {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    border: 2px solid transparent;
    background: transparent;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    flex: 1;
    max-width: 400px;
    transition: all 0.2s ease;
}

.session-name-input[readonly] {
    cursor: default;
}

.session-name-input:not([readonly]) {
    border-color: #4CAF50;
    background: #fff;
    cursor: text;
}

.session-name-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.session-rename-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #666;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.session-rename-btn:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
}

.session-storage-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: #e9ecef;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #495057;
    white-space: nowrap;
}

/* Active Indicator */
.session-active-indicator {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: #4CAF50;
    color: #fff;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Session Preview */
.session-preview {
    margin-bottom: 1rem;
}

.session-preview-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.375rem 0;
    font-size: 0.95rem;
}

.preview-label {
    color: #666;
    font-weight: 500;
    min-width: 100px;
}

.preview-value {
    color: #333;
    flex: 1;
}

/* Session Card Actions */
.session-card-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
}

.session-action-btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.session-switch-btn {
    background: #4CAF50;
    color: #fff;
    flex: 1;
}

.session-switch-btn:hover {
    background: #45a049;
}

.session-current-btn {
    background: #e0e0e0;
    color: #999;
    flex: 1;
    cursor: not-allowed;
}

.session-delete-btn {
    background: #f44336;
    color: #fff;
}

.session-delete-btn:hover {
    background: #da190b;
}

/* Modal Footer */
.sessions-modal-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sessions-modal-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sessions-create-btn {
    background: #2196F3;
    color: #fff;
}

.sessions-create-btn:hover:not(:disabled) {
    background: #0b7dda;
}

.sessions-create-btn:disabled {
    background: #ccc;
    color: #999;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.sessions-limit-msg {
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sessions-modal-content {
        width: 95%;
        max-height: 100dvh;
    }
    
    .sessions-modal-header {
        padding: 1rem;
    }
    
    .sessions-modal-header h2 {
        font-size: 1.25rem;
    }
    
    .sessions-modal-body {
        padding: 1rem;
    }
    
    .sessions-modal-warning {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .session-card {
        padding: 1rem;
    }
    
    .session-name-input {
        font-size: 1.1rem;
        max-width: 100%;
    }
    
    .session-card-actions {
        flex-direction: column;
    }
    
    .sessions-modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .sessions-modal-btn {
        width: 100%;
        justify-content: center;
    }
    
    .sessions-limit-msg {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .sessions-modal-content {
        width: 100%;
        max-height: 100dvh;
        border-radius: 0;
    }
    
    .sessions-modal-header {
        border-radius: 0;
    }
    
    .sessions-modal-footer {
        border-radius: 0;
    }
    
    .session-name-input {
        font-size: 1rem;
    }
    
    .session-preview-row {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .preview-label {
        min-width: auto;
        font-weight: 600;
    }
}

/* Session Button (in main UI) */
.sessions-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #2196F3;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sessions-btn:hover {
    background: #0b7dda;
}

.sessions-btn-icon {
    font-size: 1.1rem;
    line-height: 1;
}
