/* Shipyard Workforce Optimizer Styles */

:root {
    --primary-blue: #2c5282;
    --secondary-blue: #3182ce;
    --light-blue: #63b3ed;
    --dark-gray: #2d3748;
    --medium-gray: #4a5568;
    --light-gray: #f7fafc;
    --success-green: #38a169;
    --warning-orange: #ed8936;
    --danger-red: #e53e3e;
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Global Styles */
body {
    background-color: var(--light-gray);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-gray);
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-header {
    border-bottom: 1px solid #e2e8f0;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

/* Form Styling */
.form-control {
    border-radius: var(--border-radius);
    border: 1px solid #cbd5e0;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 0.2rem rgba(49, 130, 206, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--medium-gray);
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-primary:hover {
    background-color: var(--secondary-blue);
    border-color: var(--secondary-blue);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    color: var(--medium-gray);
    border-color: #cbd5e0;
}

.btn-outline-secondary:hover {
    background-color: var(--medium-gray);
    border-color: var(--medium-gray);
}

/* Scenario Cards */
.scenario-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.scenario-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.scenario-card.recommended {
    border: 2px solid var(--success-green);
    position: relative;
}

.scenario-card.recommended::before {
    content: "RECOMMENDED";
    position: absolute;
    top: -1px;
    right: -1px;
    background-color: var(--success-green);
    color: white;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0 var(--border-radius) 0 0.5rem;
}

/* Scenario Icons */
.scenario-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.scenario-icon.fastest {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.scenario-icon.cost-effective {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.scenario-icon.balanced {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Schedule Breakdown */
.day-header {
    margin: 1rem 0 0.5rem 0;
    padding: 0.5rem;
    background-color: #e2e8f0;
    border-radius: var(--border-radius);
    font-weight: 600;
    color: var(--dark-gray);
}

.shift-item {
    padding: 0.75rem;
    border-radius: var(--border-radius);
    background-color: #f8fafc;
    margin-bottom: 0.5rem;
    border-left: 4px solid var(--light-blue);
}

.shift-item:last-child {
    margin-bottom: 0;
}

.shift-morning {
    border-left-color: #fbb03b;
    background-color: #fffbf0;
}

.shift-evening {
    border-left-color: #ed8936;
    background-color: #fffaf0;
}

.shift-night {
    border-left-color: #553c9a;
    background-color: #faf5ff;
}

/* Metrics */
.metric-item {
    text-align: center;
    padding: 1rem 0;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--medium-gray);
    margin-top: 0.25rem;
}

/* Alert Styling */
.alert {
    border-radius: var(--border-radius);
    border: none;
}

.alert-success {
    background-color: #f0fff4;
    color: var(--success-green);
    border-left: 4px solid var(--success-green);
}

.alert-danger {
    background-color: #fed7d7;
    color: var(--danger-red);
    border-left: 4px solid var(--danger-red);
}

/* Tooltips */
[data-bs-toggle="tooltip"] {
    cursor: help;
}

/* Chart Container */
#comparisonChart {
    max-height: 400px;
}

/* Loading States */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .scenario-card {
        margin-bottom: 1rem;
    }
    
    .metric-value {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
    }
}

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

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

/* Custom Badge Colors */
.badge-fastest {
    background-color: #667eea;
}

.badge-cost-effective {
    background-color: #f5576c;
}

.badge-balanced {
    background-color: #4facfe;
}

/* Table Styling for Mobile */
@media (max-width: 768px) {
    .table-responsive {
        border: none;
    }
    
    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }
    
    .table-responsive thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .table-responsive tr {
        border: 1px solid #ccc;
        margin-bottom: 0.5rem;
        border-radius: var(--border-radius);
        background-color: white;
    }
    
    .table-responsive td {
        border: none;
        position: relative;
        padding-left: 50% !important;
        white-space: nowrap;
    }
    
    .table-responsive td:before {
        content: attr(data-label) ": ";
        position: absolute;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
        color: var(--medium-gray);
    }
}
