/* Laboratory Designer Specific Styles */
/* Builds on main styles.css and ars_magica_styles.css */

:root {
    /* Laboratory Designer specific colors */
    --lab-primary: #1a0e08;
    --lab-secondary: #2a1a0f;
    --lab-accent: #3a2417;
    --lab-gold: #d4af37;
    --lab-text-primary: #f4f1e8;
    --lab-text-secondary: #e6d4b7;
    --lab-text-muted: #b8a082;
    --lab-border: #4a3628;
    --lab-border-accent: #6b4e37;
    --lab-success: #4a7c59;
    --lab-warning: #b8941f;
    --lab-danger: #b85450;
    --lab-info: #5a7ba8;
}

/* Main container adjustments for laboratory designer */
.container {
    background: linear-gradient(135deg, var(--lab-primary) 0%, var(--lab-secondary) 100%);
    color: var(--lab-text-primary);
    min-height: 100vh;
}

/* Sidebar specific styling */
.sidebar {
    background: linear-gradient(135deg, var(--lab-secondary) 0%, var(--lab-accent) 100%);
    border-right: 2px solid var(--lab-border);
    padding: 1.5rem;
    width: 300px;
}

.sidebar h2 {
    color: var(--lab-gold);
    border-bottom: 2px solid var(--lab-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-family: 'Georgia', serif;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 2rem;
}

.quick-btn {
    display: block;
    width: 100%;
    padding: 0.7rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--lab-gold), #b8941f);
    color: var(--lab-primary);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Lab Summary */
.lab-summary {
    background: rgba(42, 26, 15, 0.5);
    border: 1px solid var(--lab-border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.lab-summary h3 {
    color: var(--lab-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-family: 'Georgia', serif;
}

.summary-stats {
    display: grid;
    gap: 0.5rem;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(74, 54, 40, 0.3);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--lab-text-secondary);
    font-size: 0.9rem;
}

.stat-value {
    color: var(--lab-gold);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Navigation Links */
.navigation-links {
    background: rgba(42, 26, 15, 0.5);
    border: 1px solid var(--lab-border);
    border-radius: 8px;
    padding: 1rem;
}

.navigation-links h3 {
    color: var(--lab-gold);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-family: 'Georgia', serif;
}

.navigation-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.navigation-links li {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: block;
    padding: 0.5rem;
    color: var(--lab-text-secondary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-link:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--lab-gold);
    transform: translateX(5px);
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--lab-gold), #b8941f);
    color: var(--lab-primary);
    border-bottom: 3px solid var(--lab-border-accent);
    font-family: 'Georgia', serif;
}

/* Main content area */
.main {
    background: linear-gradient(135deg, var(--lab-secondary) 0%, var(--lab-accent) 100%);
    padding: 2rem;
}

/* Section styling */
.lab-section {
    background: rgba(42, 26, 15, 0.3);
    border: 1px solid var(--lab-border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--lab-border);
    padding-bottom: 1rem;
}

.section-header h2 {
    color: var(--lab-gold);
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--lab-text-secondary);
    font-size: 1rem;
}

/* Form styling */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--lab-text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.7rem;
    border: 1px solid var(--lab-border);
    border-radius: 6px;
    background: rgba(42, 26, 15, 0.7);
    color: var(--lab-text-primary);
    font-family: inherit;
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--lab-gold);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.form-group small {
    color: var(--lab-text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

/* Size and Refinement Grid */
.size-refinement-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.size-panel,
.refinement-panel {
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.1), rgba(107, 78, 55, 0.1));
    border: 1px solid var(--lab-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.size-panel h3,
.refinement-panel h3 {
    color: var(--lab-gold);
    margin-bottom: 1rem;
    font-family: 'Georgia', serif;
}

.size-controls,
.refinement-controls {
    margin-bottom: 1.5rem;
}

.size-controls label,
.refinement-controls label {
    display: block;
    color: var(--lab-text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.size-controls input,
.refinement-controls input {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid var(--lab-border);
    border-radius: 6px;
    background: rgba(42, 26, 15, 0.7);
    color: var(--lab-text-primary);
    margin-bottom: 0.5rem;
}

.modifier-list {
    background: rgba(42, 26, 15, 0.3);
    border: 1px solid var(--lab-border);
    border-radius: 6px;
    padding: 1rem;
    min-height: 100px;
}

.size-total,
.refinement-total {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--lab-gold);
    border-radius: 6px;
    padding: 1rem;
    text-align: center;
    color: var(--lab-gold);
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
}

/* Virtues and Flaws Grid */
.virtues-flaws-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.virtues-panel,
.flaws-panel {
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.1), rgba(107, 78, 55, 0.1));
    border: 1px solid var(--lab-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.virtues-panel h3 {
    color: var(--lab-success);
}

.flaws-panel h3 {
    color: var(--lab-danger);
}

.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--lab-border);
    background: rgba(42, 26, 15, 0.5);
    color: var(--lab-text-secondary);
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tab-btn.active {
    background: var(--lab-gold);
    color: var(--lab-primary);
    border-color: var(--lab-gold);
}

.tab-btn:hover:not(.active) {
    background: rgba(212, 175, 55, 0.2);
    color: var(--lab-gold);
}

.virtue-list,
.flaw-list {
    background: rgba(42, 26, 15, 0.3);
    border: 1px solid var(--lab-border);
    border-radius: 0 6px 6px 6px;
    padding: 1rem;
    min-height: 200px;
    max-height: 300px;
    overflow-y: auto;
}

.selected-list {
    background: rgba(42, 26, 15, 0.3);
    border: 1px solid var(--lab-border);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    min-height: 80px;
    max-height: 200px;
    overflow-y: auto;
}

.virtue-item,
.flaw-item {
    background: rgba(139, 115, 85, 0.1);
    border: 1px solid var(--lab-border);
    border-radius: 4px;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.virtue-item:hover {
    background: rgba(74, 124, 89, 0.2);
    border-color: var(--lab-success);
    transform: translateX(3px);
}

.flaw-item:hover {
    background: rgba(184, 84, 80, 0.2);
    border-color: var(--lab-danger);
    transform: translateX(3px);
}

.virtue-item.selected {
    background: rgba(74, 124, 89, 0.3);
    border-color: var(--lab-success);
}

.flaw-item.selected {
    background: rgba(184, 84, 80, 0.3);
    border-color: var(--lab-danger);
}

.virtue-name,
.flaw-name {
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.virtue-name {
    color: var(--lab-success);
}

.flaw-name {
    color: var(--lab-danger);
}

.virtue-description,
.flaw-description {
    color: var(--lab-text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.virtue-cost,
.flaw-cost {
    font-weight: 600;
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.virtue-cost {
    color: var(--lab-success);
}

.flaw-cost {
    color: var(--lab-danger);
}

/* Specializations Grid */
.specializations-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
}

.art-specializations,
.activity-specializations,
.current-specializations {
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.1), rgba(107, 78, 55, 0.1));
    border: 1px solid var(--lab-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.art-specializations h3,
.activity-specializations h3,
.current-specializations h3 {
    color: var(--lab-gold);
    margin-bottom: 1rem;
    font-family: 'Georgia', serif;
}

.arts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.techniques-section h4,
.forms-section h4 {
    color: var(--lab-text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.arts-list {
    display: grid;
    gap: 0.3rem;
}

.art-item,
.activity-item {
    background: rgba(42, 26, 15, 0.5);
    border: 1px solid var(--lab-border);
    border-radius: 4px;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    text-align: center;
}

.art-item:hover,
.activity-item:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--lab-gold);
    color: var(--lab-gold);
}

.art-item.selected,
.activity-item.selected {
    background: var(--lab-gold);
    color: var(--lab-primary);
    border-color: var(--lab-gold);
}

.activities-list {
    display: grid;
    gap: 0.5rem;
}

.specialization-summary {
    background: rgba(42, 26, 15, 0.3);
    border: 1px solid var(--lab-border);
    border-radius: 6px;
    padding: 1rem;
    min-height: 100px;
}

.specialization-item {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--lab-gold);
    border-radius: 4px;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.specialization-name {
    color: var(--lab-gold);
    font-weight: 600;
}

.specialization-bonus {
    color: var(--lab-success);
    font-weight: 600;
}

/* Calculations Grid */
.calculations-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

.base-totals,
.specialized-totals,
.safety-calculation {
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.1), rgba(107, 78, 55, 0.1));
    border: 1px solid var(--lab-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.base-totals h3,
.specialized-totals h3,
.safety-calculation h3 {
    color: var(--lab-gold);
    margin-bottom: 1rem;
    font-family: 'Georgia', serif;
}

.totals-list,
.specialized-list,
.safety-stats {
    display: grid;
    gap: 0.5rem;
}

.total-item,
.safety-item {
    background: rgba(42, 26, 15, 0.3);
    border: 1px solid var(--lab-border);
    border-radius: 4px;
    padding: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-label,
.safety-label {
    color: var(--lab-text-secondary);
    font-size: 0.9rem;
}

.total-value {
    color: var(--lab-gold);
    font-weight: 600;
    font-size: 1rem;
}

.safety-value {
    font-weight: 600;
    font-size: 0.9rem;
}

.safety-value.low {
    color: var(--lab-success);
}

.safety-value.medium {
    color: var(--lab-warning);
}

.safety-value.high {
    color: var(--lab-danger);
}

/* Activities Planner */
.activities-planner {
    display: grid;
    gap: 2rem;
}

.season-selector {
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.1), rgba(107, 78, 55, 0.1));
    border: 1px solid var(--lab-border);
    border-radius: 8px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    align-items: end;
}

.season-selector label {
    color: var(--lab-text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.season-selector select,
.season-selector input {
    padding: 0.7rem;
    border: 1px solid var(--lab-border);
    border-radius: 6px;
    background: rgba(42, 26, 15, 0.7);
    color: var(--lab-text-primary);
    width: 100%;
}

.activity-options {
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.1), rgba(107, 78, 55, 0.1));
    border: 1px solid var(--lab-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.activity-options h3 {
    color: var(--lab-gold);
    margin-bottom: 1rem;
    font-family: 'Georgia', serif;
}

.activity-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.activity-card {
    background: rgba(42, 26, 15, 0.5);
    border: 1px solid var(--lab-border);
    border-radius: 6px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.activity-card:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--lab-gold);
    transform: translateY(-2px);
}

.activity-card.selected {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--lab-gold);
}

.activity-card h4 {
    color: var(--lab-gold);
    margin-bottom: 0.5rem;
    font-family: 'Georgia', serif;
}

.activity-card p {
    color: var(--lab-text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
}

.season-plan {
    background: linear-gradient(135deg, rgba(139, 115, 85, 0.1), rgba(107, 78, 55, 0.1));
    border: 1px solid var(--lab-border);
    border-radius: 8px;
    padding: 1.5rem;
}

.season-plan h3 {
    color: var(--lab-gold);
    margin-bottom: 1rem;
    font-family: 'Georgia', serif;
}

.plan-details {
    background: rgba(42, 26, 15, 0.3);
    border: 1px solid var(--lab-border);
    border-radius: 6px;
    padding: 1rem;
    min-height: 100px;
}

/* Export Section */
.export-section {
    background: rgba(42, 26, 15, 0.3);
    border: 1px solid var(--lab-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.export-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.export-btn {
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--lab-gold), #b8941f);
    color: var(--lab-primary);
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background: linear-gradient(135deg, var(--lab-secondary), var(--lab-accent));
    margin: 5% auto;
    padding: 2rem;
    border: 2px solid var(--lab-border-accent);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    color: var(--lab-text-primary);
    position: relative;
}

.close {
    color: var(--lab-text-muted);
    float: right;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.close:hover {
    color: var(--lab-gold);
}

.modal h2 {
    color: var(--lab-gold);
    margin-bottom: 1.5rem;
    font-family: 'Georgia', serif;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.btn-primary {
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, var(--lab-gold), #b8941f);
    color: var(--lab-primary);
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary {
    padding: 0.7rem 1.5rem;
    background: transparent;
    color: var(--lab-text-secondary);
    border: 1px solid var(--lab-border);
    border-radius: 6px;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 250px 1fr;
    }
    
    .sidebar {
        width: 250px;
    }
    
    .calculations-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .specializations-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "sidebar"
            "content";
    }
    
    .sidebar {
        position: static;
        height: auto;
        width: 100%;
        order: 2;
    }
    
    .main {
        order: 3;
    }
    
    .header {
        order: 1;
    }
    
    .size-refinement-grid {
        grid-template-columns: 1fr;
    }
    
    .virtues-flaws-grid {
        grid-template-columns: 1fr;
    }
    
    .calculations-grid {
        grid-template-columns: 1fr;
    }
    
    .specializations-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main {
        padding: 1rem;
    }
    
    .lab-section {
        padding: 1rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .arts-grid {
        grid-template-columns: 1fr;
    }
    
    .export-options {
        grid-template-columns: 1fr;
    }
    
    .activity-cards {
        grid-template-columns: 1fr;
    }
    
    .season-selector {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar styling for webkit browsers */
.virtue-list::-webkit-scrollbar,
.flaw-list::-webkit-scrollbar,
.selected-list::-webkit-scrollbar {
    width: 6px;
}

.virtue-list::-webkit-scrollbar-track,
.flaw-list::-webkit-scrollbar-track,
.selected-list::-webkit-scrollbar-track {
    background: rgba(42, 26, 15, 0.3);
    border-radius: 3px;
}

.virtue-list::-webkit-scrollbar-thumb,
.flaw-list::-webkit-scrollbar-thumb,
.selected-list::-webkit-scrollbar-thumb {
    background: var(--lab-border);
    border-radius: 3px;
}

.virtue-list::-webkit-scrollbar-thumb:hover,
.flaw-list::-webkit-scrollbar-thumb:hover,
.selected-list::-webkit-scrollbar-thumb:hover {
    background: var(--lab-gold);
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--lab-gold);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}