@import url('https://fonts.googleapis.com/css2?family=Irish+Grover&family=Roboto:wght@300;400;500;700&display=swap');

html, body {
    height: 100%;
}

/* Dash mounting points */
#react-entry-point,
#_dash-app-content,
#_dash-global-error-container {
    height: 100%;
}

body {
    background: #F5F7F5;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
}

@media (max-height: 900px) {
    .main-title {
        font-size: 2.0rem;
        margin: 10px 0;
    }
    .panel {
        margin: 12px;
        padding: 12px;
    }
}

.main-title {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    color: #7C9885;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    font-size: 2.5rem;
    margin: 20px 0;
    text-align: center;
    position: relative;
    letter-spacing: 1px;
}

.main-title::before {
    content: "🍀";
    position: absolute;
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
}

.main-title::after {
    content: "🍀";
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
}

.panel {
    background: rgba(255,255,255,0.9);
    border: 3px solid #B5C5B5;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    margin: 20px;
    padding: 20px;
}

.upload-panel {
    background: rgba(248,253,248,0.9);
    border: 2px dashed #7C9885;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.upload-panel:hover {
    border-color: #5A7A60;
    background: rgba(248,253,248,1);
}

.upload-zone {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.upload-icon {
    font-size: 3rem;
    color: #7C9885;
    margin-bottom: 15px;
}

.upload-text {
    color: #5A7A60;
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.upload-subtext {
    color: #8A9A8A;
    font-size: 0.9rem;
}

.job-card {
    background: rgba(255,255,255,0.95);
    border: 2px solid #B5C5B5;
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.job-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #FFF3CD;
    color: #856404;
    border: 1px solid #FFEAA7;
}

.status-uploading {
    background: #E2E3F3;
    color: #6C757D;
    border: 1px solid #DEE2E6;
}

.status-queued {
    background: #CCE5FF;
    color: #004085;
    border: 1px solid #B3D9FF;
}

.status-running {
    background: #FFF3CD;
    color: #856404;
    border: 1px solid #FFEAA7;
    animation: pulse 2s infinite;
}

.status-completed {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.status-failed {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.status-cancelled {
    background: #E2E3F3;
    color: #6C757D;
    border: 1px solid #DEE2E6;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.progress-bar {
    background: #E9ECEF;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    background: linear-gradient(90deg, #7C9885, #5A7A60);
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s ease;
}

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

.form-label {
    display: block;
    font-weight: 500;
    color: #5A7A60;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #B5C5B5;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: rgba(255,255,255,0.9);
}

.form-input:focus {
    outline: none;
    border-color: #7C9885;
    box-shadow: 0 0 0 3px rgba(124,152,133,0.1);
}

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

.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #7C9885, #5A7A60);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5A7A60, #4A6A50);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124,152,133,0.3);
}

.btn-secondary {
    background: #E9ECEF;
    color: #6C757D;
    border: 1px solid #DEE2E6;
}

.btn-secondary:hover {
    background: #DEE2E6;
    border-color: #D1E7DD;
}

.btn-success {
    background: #28A745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-danger {
    background: #DC3545;
    color: white;
}

.btn-danger:hover {
    background: #C82333;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.file-list {
    background: rgba(248,253,248,0.5);
    border: 1px solid #B5C5B5;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #E9ECEF;
}

.file-item:last-child {
    border-bottom: none;
}

.file-info {
    display: flex;
    align-items: center;
}

.file-icon {
    margin-right: 10px;
    font-size: 1.2rem;
    color: #7C9885;
}

.file-name {
    font-weight: 500;
    color: #5A7A60;
}

.file-size {
    color: #8A9A8A;
    font-size: 0.9rem;
    margin-left: 10px;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid transparent;
}

.alert-info {
    background: #CCE5FF;
    color: #004085;
    border-color: #B3D9FF;
}

.alert-success {
    background: #D4EDDA;
    color: #155724;
    border-color: #C3E6CB;
}

.alert-warning {
    background: #FFF3CD;
    color: #856404;
    border-color: #FFEAA7;
}

.alert-danger {
    background: #F8D7DA;
    color: #721C24;
    border-color: #F5C6CB;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: 1fr 1fr;
}

.grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .main-title::before,
    .main-title::after {
        display: none;
    }
    
    .panel {
        margin: 10px;
        padding: 15px;
    }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #7C9885;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

.dashboard-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, #7C9885, #5A7A60);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dashboard-link:hover {
    background: linear-gradient(135deg, #5A7A60, #4A6A50);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124,152,133,0.3);
    color: white;
    text-decoration: none;
}

.dashboard-icon {
    margin-right: 8px;
}

/* Dash specific overrides */
.dash-table-container {
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    overflow: hidden;
}

.Select-control {
    border: 2px solid #B5C5B5 !important;
    border-radius: 8px !important;
}

.Select-control:hover {
    border-color: #7C9885 !important;
}

.Select--is-focused .Select-control {
    border-color: #7C9885 !important;
    box-shadow: 0 0 0 3px rgba(124,152,133,0.1) !important;
}

/* Upload component styling */
._dash-undo-redo {
    display: none;
}

.upload-component {
    border: 2px dashed #7C9885;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    background: rgba(248,253,248,0.9);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-component:hover {
    border-color: #5A7A60;
    background: rgba(248,253,248,1);
}

.upload-component:active {
    transform: scale(0.98);
}

/* ========================================
   Tutorial (driver.js) Styling
   ======================================== */

/* Custom popover styling to match gRINN theme */
.grinn-tutorial-popover {
    font-family: 'Roboto', sans-serif;
}

.driver-popover {
    background-color: #f0f7f1 !important;
    border: 2px solid #5A7A60 !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(90, 122, 96, 0.3) !important;
}

.driver-popover-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #4A6A50 !important;
    margin-bottom: 10px !important;
}

.driver-popover-description {
    font-size: 0.95rem !important;
    color: #3A5A40 !important;
    line-height: 1.5 !important;
}

.driver-popover-description strong {
    color: #2A4A30;
}

/* Progress indicator */
.driver-popover-progress-text {
    font-size: 0.8rem !important;
    color: #6A8A70 !important;
}

/* Navigation buttons - match app button style */
.driver-popover-navigation-btns {
    gap: 8px !important;
}

.driver-popover-next-btn,
.driver-popover-close-btn-text {
    background-color: #5A7A60 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 5px !important;
    padding: 8px 16px !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    transition: background-color 0.2s ease !important;
    box-shadow: none !important;
    filter: none !important;
    text-shadow: none !important;
    outline: none !important;
    -webkit-box-shadow: none !important;
}

.driver-popover-next-btn:hover,
.driver-popover-close-btn-text:hover {
    background-color: #4A6A50 !important;
    box-shadow: none !important;
    filter: none !important;
}

.driver-popover-next-btn:focus,
.driver-popover-close-btn-text:focus {
    box-shadow: none !important;
    outline: none !important;
}

.driver-popover-prev-btn {
    background-color: rgba(90, 122, 96, 0.1) !important;
    border: 1px solid rgba(90, 122, 96, 0.3) !important;
    color: #5A7A60 !important;
    border-radius: 5px !important;
    padding: 8px 16px !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
}

.driver-popover-prev-btn:hover {
    background-color: rgba(90, 122, 96, 0.2) !important;
}

/* X close button */
.driver-popover-close-btn {
    color: #6A8A70 !important;
    font-size: 1.2rem !important;
}

.driver-popover-close-btn:hover {
    color: #4A6A50 !important;
}

/* Lighter overlay for less contrast */
.driver-overlay {
    background-color: rgba(90, 122, 96, 0.15) !important;
}

/* Highlighted element stage */
.driver-active-element {
    box-shadow: 0 0 0 4px rgba(90, 122, 96, 0.4) !important;
}

/* Popover arrow - match popover background */
.driver-popover-arrow-side-left::before,
.driver-popover-arrow-side-left::after,
.driver-popover-arrow-side-right::before,
.driver-popover-arrow-side-right::after,
.driver-popover-arrow-side-top::before,
.driver-popover-arrow-side-top::after,
.driver-popover-arrow-side-bottom::before,
.driver-popover-arrow-side-bottom::after {
    border-color: transparent !important;
}

.driver-popover-arrow-side-bottom::after {
    border-bottom-color: #f0f7f1 !important;
}

.driver-popover-arrow-side-top::after {
    border-top-color: #f0f7f1 !important;
}

.driver-popover-arrow-side-left::after {
    border-left-color: #f0f7f1 !important;
}

.driver-popover-arrow-side-right::after {
    border-right-color: #f0f7f1 !important;
}

/* Tutorial waiting indicator for action-based steps */
.tutorial-waiting-indicator {
    color: #5A7A60;
    font-size: 0.85rem;
    font-style: italic;
    display: flex;
    align-items: center;
    animation: pulse-gentle 2s ease-in-out infinite;
    flex: 1 1 100%;  /* Take full width on its own line */
    order: -1;       /* Appear before buttons */
    margin-bottom: 8px;
}

.tutorial-waiting-indicator i {
    margin-right: 6px;
    animation: point-bounce 1s ease-in-out infinite;
}

@keyframes pulse-gentle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes point-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

/* Proper footer layout for tutorial waiting indicator */
.driver-popover-footer {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
}