/* css/style.css for huong-nghiep-ai */
body { font-family: 'Montserrat', sans-serif; background-color: #f8f9fa; }
.container { max-width: 850px; }
.card { border: none; }
.card-header { font-weight: 500; }
.instruction-panel {
    border-left-width: 0.25rem;
    border-left-style: solid;
    font-size: 0.95rem;
}
.instruction-panel .alert-heading {
    font-weight: 500;
}
/* Question option styling */
.question-item .form-check-label {
    display: block;
    padding: 10px 15px;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
    background-color: #fff;
    width: 100%; 
}
.question-item .form-check-label:hover {
    background-color: #f0f0f0; 
    border-color: #adb5bd;
}
.question-item .form-check-input {
    display: none; /* Hide the actual radio button */
}
.question-item .form-check-input:checked + .form-check-label {
    background-color: #0d6efd;
    color: white;
    border-color: #0a58ca;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
#user-info-section, #quiz-section, #initial-result-section, #situational-quiz-section, #final-payment-wall-section, #payment-section, #final-result-section, #next-step-selection-section { animation: fadeIn 0.5s ease-out; }

/* AI Response Container (reused for initial and final) */
.ai-response-container { background-color: #ffffff; padding: 20px; border-radius: 0.375rem; border: 1px solid #dee2e6; margin-top: 1rem; font-size: 0.95rem; line-height: 1.6; }
.ai-response-container h3, .ai-response-container h4 { margin-top: 1.2em; margin-bottom: 0.6em; color: #0056b3; }

/* --- ACCORDION STYLE UPDATE (APPLIES TO ALL ACCORDIONS IN AI RESPONSES) --- */
.ai-response-container details { 
    border: 1px solid #c82333; /* Darker Red border */
    border-radius: 8px;
    margin-bottom: 1em; 
    background-color: #fff;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.ai-response-container details:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* The accordion "button" */
.ai-response-container summary { 
    font-weight: 600; /* Bolder text */
    font-size: 1.1rem;
    padding: 0.85em 1.25em; /* Slightly more padding */
    cursor: pointer; 
    background: linear-gradient(135deg, #FF2C5D, #C2133F);
    color: white;
    position: relative;
    list-style: none; /* Remove the default triangle */
    transition: background-color 0.2s ease;
    outline: none;
}
/* Remove default marker for Safari/Chrome */
.ai-response-container summary::-webkit-details-marker {
  display: none;
}
/* Create a custom triangle */
.ai-response-container summary::before {
    content: '▶';
    position: absolute;
    left: 15px; /* A bit more space from the edge */
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.2s ease-in-out;
    font-size: 0.8em;
}
.ai-response-container details[open] > summary::before {
    transform: translateY(-50%) rotate(90deg);
}

.ai-response-container summary:hover {
    opacity: 0.9;
}
.ai-response-container details[open] > summary {
    border-bottom: 1px solid #b02a37; /* Add a bottom border only when open */
}
/* The content inside the accordion */
.ai-response-container details > *:not(summary) { 
    padding: 1.25em; /* Consistent padding */
}
/* --- END OF ACCORDION STYLE UPDATE --- */


/* --- BUTTON STYLE INSIDE ACCORDION --- */
.accordion-action-button {
    display: inline-block;
    font-weight: 500;
    color: #000;
    background-color: #ffc107; /* Bootstrap warning yellow */
    border-color: #ffc107;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 0.375rem;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}
.accordion-action-button:hover {
    background-color: #ffca2c;
    border-color: #ffca2c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Final Payment Wall Checklist */
.feature-checklist-final li { line-height: 1.6; }
.feature-checklist-final i { width: 25px; text-align: center; }

/* Chart Container */
#evaluation-chart-container {
    max-width: 500px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 15px;
    background-color: #fff;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    aspect-ratio: 1 / 1;
    position: relative;
}

/* Wrapper for the table to enable horizontal scrolling on small screens */
.report-table-wrapper {
  width: 100%;
  overflow-x: auto;                   /* allow horizontal scroll on small screens */
  -webkit-overflow-scrolling: touch;  /* smooth scrolling on iOS */
  margin: 1em 0;
}

.report-table-wrapper table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;                   /* ensure it doesn’t shrink too much */
}

.report-table-wrapper th,
.report-table-wrapper td {
  padding: 0.75em 1em;
  text-align: left;
  border: 1px solid #ddd;
}

.report-table-wrapper thead {
  background-color: #009879;
  color: #fff;
  font-weight: normal;
}

.report-table-wrapper tbody tr:nth-child(even) {
  background-color: #f3f3f3;
}

.report-table-wrapper tbody tr:hover {
  background-color: #e9f5f2;
}

/* tighten up padding on phone screens */
@media (max-width: 600px) {
  .report-table-wrapper th,
  .report-table-wrapper td {
    padding: 0.5em;
  }
}

/* Base table styling */
.ai-response-container table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px; /* Prevent table from becoming too narrow */
    font-size: 0.9rem;
    color: #212529;
    background-color: #fff;
}

/* Table header styling */
.ai-response-container th {
    background-color: #f8f9fa; /* A light grey background */
    color: #495057;
    font-weight: 600; /* Bolder headers */
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid #dee2e6; /* A thicker bottom border for headers */
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

/* Table cell (td) styling */
.ai-response-container td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef; /* Lighter border for rows */
    vertical-align: top; /* Align content to the top of the cell */
}

/* Zebra-striping for rows for better readability */
.ai-response-container tbody tr:nth-of-type(even) {
    background-color: rgba(0, 0, 0, 0.03);
}

/* Hover effect on rows */
.ai-response-container tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

/* Styling for the first column to make it stand out */
.ai-response-container td:first-child,
.ai-response-container th:first-child {
    font-weight: 500;
}

/* Ensure no bottom border for the last row */
.ai-response-container tbody tr:last-of-type td {
    border-bottom: 0;
}

.ai-response-container details button.accordion-action-button {
    display: none;
}

/* --- ACCORDION STYLE UPDATE (APPLIES TO ALL ACCORDIONS IN AI RESPONSES) --- */
#ai-response-container-initial details { 
    border: 1px solid #c82333; /* Darker Red border */
    border-radius: 8px;
    margin-bottom: 1em; 
    background-color: #fff;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
#ai-response-container-initial details:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* The accordion "button" */
#ai-response-container-initial summary { 
    font-weight: 600; /* Bolder text */
    font-size: 1.1rem;
    padding: 0.85em 1.25em; /* Slightly more padding */
    cursor: pointer; 
    background-color: #dc3545; /* Bootstrap danger red */
    color: white;
    position: relative;
    list-style: none; /* Remove the default triangle */
    transition: background-color 0.2s ease;
    outline: none;
}
/* Remove default marker for Safari/Chrome */
#ai-response-container-initial summary::-webkit-details-marker {
  display: none;
}
/* Create a custom triangle */
#ai-response-container-initial summary::before {
    content: '▶';
    position: absolute;
    left: 15px; /* A bit more space from the edge */
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.2s ease-in-out;
    font-size: 0.8em;
}
#ai-response-container-initial details[open] > summary::before {
    transform: translateY(-50%) rotate(90deg);
}

#ai-response-container-initial summary:hover {
    background-color: #c82333; /* Darker red on hover */
}
#ai-response-container-initial details[open] > summary {
    border-bottom: 1px solid #b02a37; /* Add a bottom border only when open */
}
/* The content inside the accordion */
#ai-response-container-initial details > *:not(summary) { 
    padding: 1.25em; /* Consistent padding */
}
/* --- END OF ACCORDION STYLE UPDATE --- */
#home-button {
    position: fixed;
    top: 20px;
    left: 20px;
    
    /* Let the button size itself, but control spacing with padding */
    padding: 10px 15px;
    
    font-size: 1rem; /* A more standard font size */
    font-weight: 500; /* Make text slightly bolder */
    
    /* Flex properties to align icon and text */
    display: flex;
    align-items: center;
    justify-content: center;
    
    z-index: 1000;
    transition: transform 0.2s ease-in-out;
}

#home-button:hover {
    transform: scale(1.05); /* A slightly more subtle hover effect */
}

/* Optional: Ensure the icon size is consistent */
#home-button i {
    font-size: 1.2em;
}
#sticky-actions-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    
    /* Use flexbox to align buttons horizontally */
    display: flex;
    gap: 10px; /* Creates a nice space between the buttons */
}

/* Common style for both buttons inside the container */
#sticky-actions-container .btn {
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease-in-out;
}

#sticky-actions-container .btn:hover {
    transform: scale(1.05);
}

#sticky-actions-container .btn i {
    font-size: 1.1em;
    margin-right: 8px; /* Space between icon and text */
}

.home-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    margin-right: 8px;
}
img.logo {
    width: 300px;
    height: auto;
}
.btn-gradient {
  background: linear-gradient(135deg, #00CFFF, #0078FF);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn-gradient:hover {
  background: linear-gradient(135deg, #00b8e6, #0066e6);
}


.countdown-widget {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 3px solid;
    border-image: linear-gradient(135deg, #00CFFF, #0078FF) 1;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 10px 30px rgba(0, 207, 255, 0.2),
        0 0 40px rgba(0, 120, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    text-align: center;
    position: relative;
    overflow: hidden;
    color: #2c3e50;
    max-width: 600px;
    margin: 0 auto;
    backdrop-filter: blur(10px);
}

.countdown-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(0, 207, 255, 0.05),
        transparent,
        rgba(0, 120, 255, 0.05),
        transparent
    );
    animation: countdown-scan 4s linear infinite;
}

@keyframes countdown-scan {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.countdown-widget .title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #00CFFF, #0078FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 120, 255, 0.1);
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.countdown-widget .time-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.countdown-widget .time-unit {
    background: linear-gradient(145deg, #ffffff, #f1f3f4);
    border: 2px solid;
    border-image: linear-gradient(135deg, #00CFFF, #0078FF) 1;
    border-radius: 15px;
    padding: 15px 12px;
    min-width: 75px;
    box-shadow: 
        0 8px 20px rgba(0, 207, 255, 0.15),
        0 2px 8px rgba(0, 120, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.countdown-widget .time-unit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 207, 255, 0.1), transparent);
    animation: countdown-shimmer 3s ease-in-out infinite;
}

@keyframes countdown-shimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.countdown-widget .time-number {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #00CFFF, #0078FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    position: relative;
    z-index: 1;
    animation: countdown-pulse 2s ease-in-out infinite;
}

@keyframes countdown-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.countdown-widget .time-label {
    font-size: 11px;
    margin-top: 5px;
    color: #6c757d;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.countdown-widget .separator {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(135deg, #00CFFF, #0078FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    animation: countdown-blink 1.5s infinite;
}

@keyframes countdown-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.4; }
}

.countdown-widget .reset-info {
    font-size: 13px;
    margin-top: 15px;
    color: #6c757d;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.countdown-widget .progress-bar {
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #e9ecef, #dee2e6);
    border-radius: 10px;
    margin-top: 20px;
    overflow: hidden;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.countdown-widget .progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #00CFFF, #0078FF);
    border-radius: 10px;
    transition: width 1s ease;
    box-shadow: 
        0 0 20px rgba(0, 207, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.countdown-widget .progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: countdown-progress-shine 2s ease-in-out infinite;
}

@keyframes countdown-progress-shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

@media (max-width: 768px) {
    .countdown-widget {
        padding: 20px;
        margin: 10px;
    }
    
    .countdown-widget .time-display {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .countdown-widget .time-unit {
        min-width: 60px;
        padding: 12px 8px;
    }
    
    .countdown-widget .time-number {
        font-size: 24px;
    }
    
    .countdown-widget .separator {
        font-size: 24px;
    }
    
    .countdown-widget .title {
        font-size: 18px;
    }
}

#generate-qr-btn {
    margin: auto;
}

.friendly-browser-modal .modal-content {
        border-radius: 16px;
        border: none;
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        text-align: center;
        padding: 20px;
    }

    .friendly-browser-modal .modal-header {
        border-bottom: none;
        padding-top: 0;
        padding-bottom: 0;
    }
    
    .friendly-browser-modal .modal-header .btn-close {
        position: absolute;
        top: 15px;
        right: 15px;
    }

    .friendly-browser-modal .modal-body {
        padding: 10px 20px;
    }

    .friendly-browser-modal .modal-footer {
        border-top: none;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 0 20px 20px 20px;
    }
    
    .modal-illustration {
        width: 120px;
        height: 120px;
        margin: 0 auto 20px auto;
        background-color: #e3f2fd; /* Màu xanh nhạt của Google */
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .modal-illustration i {
        font-size: 50px;
        color: #0d6efd; /* Màu xanh chính */
    }

    .friendly-browser-modal .modal-title {
        font-size: 1.5rem;
        font-weight: 700;
        color: #212529;
        width: 100%;
    }

    .friendly-browser-modal .modal-body p {
        color: #495057;
        font-size: 1rem;
        line-height: 1.6;
    }

    .friendly-browser-modal .btn-primary {
        border-radius: 50px;
        padding: 12px 20px;
        font-weight: 600;
    }
    
    .friendly-browser-modal .btn-link {
        font-weight: 600;
        color: #6c757d;
        text-decoration: none;
    }