/* Survey Widget Styles */
.survey-widget {
    --primary-color: #4564ED;
    --primary-color-darker: #3a5fd9;
    --text-color-white: #FFFFFF;
    --text-color-dark: #3D3D3D;
    --text-color-light: #666;
    --text-color-lighter: #888;
    --text-color-lightest: #888888;
    --border-color-light: #e5e5e5;
    --border-color-medium: #e0e0e0;
    --border-color-dark: #ccc;
    --background-light: #faf9f9;
    --background-white: #fff;
    --background-hover: #f8f9ff;
    --background-hover-dark: #f5f5f5;
    --button-disabled-bg: #9ca3af;
    --ring-color: #63D2F9;

    --border-radius-small: 8px;
    --border-radius-medium: 12px;
    --border-radius-large: 16px;

    --font-size-small: 12px;
    --font-size-medium: 14px;
    --font-size-large: 16px;
    --font-size-xlarge: 20px;
    --font-size-xxlarge: 24px;
    background-image: url('../images/suggest-data/background/upscale_image.png'), url('../images/suggest-data/background/abstract.jpg');
    background-position: center center, right bottom;
    background-repeat: no-repeat, no-repeat;
    background-size: cover, auto 300px;
    position: relative;
    padding: 60px 0;
    width: 100%;
}
.survey-widget::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #8037004D;
    z-index: 1;
    pointer-events: none;
}
.survey-widget .survey-container {
    margin: 0 auto;
    position: relative;
    z-index: 2;
    width: 100%;
}
.survey-decor-img {
    position: absolute;
    top: 50px;
    left: 0%;
    width: 20%;
    transform: rotate(-45deg);
    z-index: 4;
    pointer-events: none;
}

.survey-header {
    margin-bottom: 45px;
    position: relative;
    z-index: 3;
}

.survey-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color-white);
    margin-bottom: 60px;
    line-height: 1.3;
    text-align: center;
}

.step-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: center;
}


.progress-ring__circle {
    transition: stroke-dashoffset 0.7s ease-in-out;
    transform: rotate(-90deg);
    transform-origin: 68px 66px; 
}

.survey-content {
    position: relative;
    background: var(--background-white);
    border-radius: var(--border-radius-large);
    padding: 40px 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    background-color: #FFFFFF33; /* Màu nền trắng với độ trong suốt 20% */
    backdrop-filter: blur(20px); /* Hiệu ứng làm mờ nền phía sau */
    -webkit-backdrop-filter: blur(20px);    
     z-index: 2;
}

.survey-question {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color-white);
    margin-top: 32px;
}

.survey-description {
    font-size: var(--font-size-large);
    color: var(--text-color-white);
    line-height: 1.5;
}

.survey-note {
    font-size: var(--font-size-medium);
    color: var(--text-color-white);
    font-style: italic;
    margin-bottom: 40px;
}

.survey-options {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.option-card {
    background: var(--background-light);
    border: 1px solid var(--border-color-light);
    border-radius: var(--border-radius-medium);
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 180px;
    width: 220px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.option-card.selected {
    border-color: var(--primary-color);
    border-width: 2.5px; 
    background: var(--background-white);
    box-shadow: 0 4px 20px rgba(79, 117, 255, 0.15);
}

.option-checkbox {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color-light);
    border-radius: 4px;
    background: var(--background-white);
    transition: all 0.3s ease;
}

.option-card.selected .option-checkbox {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.option-card.selected .option-checkbox::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 0px;
    width: 6px;
    height: 10px;
    border: solid var(--background-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.option-icon {
    margin-bottom: 20px;
    margin-top: 10px;
}

.option-icon img {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.option-content h4 {
    font-size: var(--font-size-large);
    font-weight: 600;
    color: var(--text-color-dark);
    margin-bottom: 4px;
    line-height: 1.3;
    
}

 .option-content p {
    font-weight: 700;
    font-size: var(--font-size-large);
    line-height: 22px;
    text-align: center;
    color: #3D3D3D;
    align-self: stretch;
 }
 /* Radio style cho bước 2 và 3 */
.option-radio {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color-light);
    border-radius: 50%;
    background: var(--background-white);
    transition: all 0.3s ease;
    box-sizing: border-box; 
}


.option-card.selected .option-radio {
    border-color: var(--primary-color); /

}
    
.option-card.selected .option-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px; 
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color); 
    display: block;
  
}

.survey-actions {
    display: flex;
    justify-content: center;
}

.survey-actions.multi {
    gap: 12px;
}

.btn-continue {
    background: var(--button-disabled-bg);
    color: var(--background-white);
    border: none;
    border-radius: var(--border-radius-small);
    padding: 16px 32px;
    font-size: var(--font-size-large);
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-back {
    background: transparent;
    color: var(--primary-color);
    border-radius: var(--border-radius-small);
    padding: 14px 24px;
    font-size: var(--font-size-large);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.btn-continue:not(:disabled) {
    background: var(--primary-color);
    cursor: pointer;
}

@media (max-width: 768px) {
  .survey-decor-img {
        display: none !important;
    }
}



/* Responsive Design */
@media (max-width: 768px) {
    .survey-header h2 {
        font-size: 24px;
    }
    
    .survey-question {
        font-size: 20px;
    }
    
    .survey-content {
        padding: 30px 20px;
    }
    
    .survey-options {
        gap: 16px;
    }
    
    .option-card {
        flex-shrink: 0; /* Prevent cards from shrinking */
        width: 180px;
        max-width: none;
        min-height: 150px;
    }
    
    .survey-widget {
        padding: 40px 0;
    }
}

@media (max-width: 480px) {
    .survey-content {
        padding: 30px 16px;
    }
    
    .option-card {
        width: calc(50% - 6px);
        max-width: 160px;
        min-height: 120px;
        padding: 20px 16px;
    }
    
    .survey-header h2 {
        font-size: 20px;
    }
    
    .survey-options {
        gap: 12px;
    }
    
    .survey-actions.multi {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-continue,
    .btn-back {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
}

/* Package Results Styles (scoped to .survey-widget) */
.survey-widget .package-results {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 16px;
    padding:45px 0 20px 0;
    overflow-x: auto;
    max-width: calc((340px * 3) + (16px * 3));
    margin: 0 auto;
    user-select: none; 
}
.survey-widget .package-results::-webkit-scrollbar { display: none; }
.survey-widget .package-results { -ms-overflow-style: none; scrollbar-width: none; }
.survey-widget .package-results.is-overflowing {
    justify-content: flex-start;
}

.survey-widget .package-card-suggest {  
    width:330px ; 
    max-width: 330px;
    height: auto;
    background: var(--background-white);
    border: 1px solid var(--border-color-medium);
    border-radius: var(--border-radius-large);
    box-shadow: 0 4px 20px #1018280A;
    cursor: pointer;    
    flex-shrink: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    overflow: visible;
    transition: all 0.3s ease;
}
.survey-widget .package-card-suggest:hover {
    box-shadow: 0 8px 30px rgba(16, 24, 40, 0.15);
    transform: translateY(-2px);
}

/* Package Body */
.survey-widget .package-card-suggest .package-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.survey-widget .package-card-suggest .card-body-content {
    padding: 0;
}

/* .survey-widget .card-info-top {
    margin-bottom: 16px;
} */

.survey-widget .package-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color-dark);
    line-height: 1.3;
}

.survey-widget .package-description {
    font-size: var(--font-size-medium);
    color: var(--text-color-light);
    line-height: 1.4;
}

.survey-widget .package-price {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
}

.survey-widget .price-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.survey-widget .price-period {
    font-size: var(--font-size-small);
    color: var(--text-color-lightest);
}


.survey-widget .speed-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #E7E7E7;
    border-radius: 8px;
    padding: 12px;
    background: #F7F7F8;
    box-shadow: 0px 0px 8px -2px rgba(16, 24, 40, 0.12),
                0px 2px 4px -4px rgba(16, 24, 40, 0.12);
    margin-bottom: 16px;
}

.survey-widget .speed-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.survey-widget .speed-info .title {
    font-size: 12px;
    color: var(--text-color-light);
    margin: 0;
    font-weight: 500;
}

.survey-widget .speed-values {
    display: flex;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color-dark);
}

.survey-widget .speed-values span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.survey-widget .speed-values span.up i,
.survey-widget .speed-values span.down i {
    background: url("../images/suggest-data/up-icon.svg") left center/16px no-repeat;
    display: flex;
    width: 16px;
    height: 16px;
}

.survey-widget .speed-values span.up b,
.survey-widget .speed-values span.down b {
    margin-left: 2.5px;
    font-weight: 700;
}

.survey-widget .speed-values span.down i {
    transform: rotate(180deg);
}

.survey-widget .speed-meter {
    width: 60px;
    height: 30px;
    position: relative;
}

.survey-widget .speed-meter svg {
    width: 100%;
    height: 100%;
}

.survey-widget .speed-gauge {
    stroke: #FF730A;
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.survey-widget .speed-needle {
    fill: #B0B0B0;
    transform-origin: 31px 26px;
    transition: transform 1.2s cubic-bezier(0.2, 0.9, 0.2, 1);
}

/* Features Container */
.survey-widget .card-suggest-features-container {
    line-height: 1.4; 
    max-height: calc(5 * 1.4em + 3 * 8px);
    overflow-y: auto;
    padding: 0 6px; 
}


.survey-widget .card-suggest-features-container::-webkit-scrollbar { width: 8px; }
.survey-widget .card-suggest-features-container::-webkit-scrollbar-thumb { background: #E7E7E7; border-radius: 6px; }
.survey-widget .card-suggest-features-container::-webkit-scrollbar-track { background: transparent; }

.survey-widget .card-features-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.survey-widget .card-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: var(--font-size-small);
    color: var(--text-color-dark);
    line-height: 1.4;
}

.survey-widget .card-feature-item .check-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.survey-widget .card-feature-item p {
    margin: 0;
    font-size: var(--font-size-small);
    color: var(--text-color-dark);
}
.survey-widget .gauge svg {
  display: block;
  width: 100%;
  height: 100%;
  margin-left: 6px;
}

.survey-widget .gauge .needle {
  -webkit-transition: -webkit-transform 1.2s cubic-bezier(0.2, 0.9, 0.2, 1);
  transition: -webkit-transform 1.2s cubic-bezier(0.2, 0.9, 0.2, 1);
  transition: transform 1.2s cubic-bezier(0.2, 0.9, 0.2, 1);
  transition: transform 1.2s cubic-bezier(0.2, 0.9, 0.2, 1), -webkit-transform 1.2s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.survey-widget .gauge .progress {
  -webkit-transition: stroke-dashoffset 1.2s cubic-bezier(0.2, 0.9, 0.2, 1);
  transition: stroke-dashoffset 1.2s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.survey-widget .gauge .percent-badge {
  position: absolute;
  left: 50%;
  bottom: 0;
  -webkit-transform: translate(-50%, 40%);
          transform: translate(-50%, 40%);
  background: #fff;
  border: 1px solid #ddd;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  color: #555;
  display: none;
}

/* Kích thước */
.survey-widget .gauge-80 {
  width: 80px;
  height: 46.7px;
}

.survey-widget .gauge-74 {
  width: 74px;
  height: 43.2px;
}

.survey-widget .gauge-66 {
  width: 66px;
  height: 38.5px;
}
.survey-widget .gauge-60 {
    width: 60px;
    height: 30px;
  }

.survey-widget .package-footer {
    padding: 0 20px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.survey-widget .btn-primary-speedx {
    width: 100%;
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--background-white);
    border: none;
    border-radius: var(--border-radius-small);
    font-size: var(--font-size-medium);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.survey-widget .btn-primary-speedx:hover {
    background: var(--primary-color-darker);
    transform: translateY(-1px);
}

.survey-widget .btn-secondary-speedx {
    width: 100%;
    padding: 10px 24px;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius-small);
    font-size: var(--font-size-medium);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.survey-widget .btn-secondary-speedx:hover {
    background: var(--primary-color);
    color: var(--background-white);
}

/* Legacy button for compatibility */
.survey-widget .btn-view-details {
    width: 100%;
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--background-white);
    border: none;
    border-radius: var(--border-radius-small);
    font-size: var(--font-size-medium);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.survey-widget .btn-view-details:hover {
    background: var(--primary-color-darker);
}

.survey-widget .recommended-speed {
    color: var(--primary-color);
    font-weight: 600;
    text-shadow: 0 0 0.5px #FFFFFFB2, 0 0 1px #FFFFFFB2;
}

.survey-widget .btn-restart {
    background: transparent;
    border: none;
    color: var(--text-color-white);
    padding: 12px 24px;
    border-radius: var(--border-radius-small);
    font-size: var(--font-size-medium);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.survey-widget .btn-restart svg path {
    width: 16px;
    height: 16px;
    stroke: var(--text-color-white);
}

.step-indicator.hide-step-4 {
    display: none;
}


.step-content[data-step="4"] .survey-content {
    padding-bottom: 40px;
}

/* Loading State Styles */
.loading-state {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}



/* Package loading - within step 4 */
.step-content[data-step="4"] .loading-state {
    padding: 40px 20px;
    min-height: 200px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

.loading-text {
    margin-top: 16px;
    margin-left: 16px;
    font-size: var(--font-size-large);
    color: var(--text-color-white);
}

.no-results-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 260px;
}

.no-results-img {
    width: 372px;
    height: auto;
    object-fit: contain;
    margin-bottom: 20px;
}

.no-results-text {
    font-size: 20px;
    color: var(--text-color-white);
    margin-top: 0;
    text-align: center;
}

/* Error state styles */
.error-state {
    text-align: center;
    padding: 40px 20px;
}

.error-state h3 {
    color: #ffffff;
    margin-bottom: 10px;
}

.error-state p {
    color: #ffffff;
    margin-bottom: 20px;
}

.btn-retry {
    background: #4564ED;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.btn-retry:hover {
    background: #3a52d4;
}

