/* Survey Form Styles - Using CSS Variables for Template Color */

#survey_body {
    padding: 40px 0px;
    max-width: 900px;
}

.question-title {
    line-height: 1.25;
    padding: 0 0 24px 0;
    font-size: 20px;
    font-style: normal;
    font-weight: normal;
    text-decoration: none;
    color: var(--survey-template-color);
}

.question-title.bold {
    font-weight: bold;
}

.question-required {
    color: #dc3545;
    margin-right: 5px;
}

#stars-wrapper {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 7px 0;
    border-radius: 5px;
}

.answer-label {
    line-height: 1.25;
    color: var(--survey-template-color);
    font-size: 18px;
    font-style: normal;
    font-weight: 300;
    text-decoration: none;
    padding: 6px 15px;
    border-radius: 4px;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.answer-label:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.answer-label.checked {
    background-color: rgba(0, 0, 0, 0.05);
    border: 1px solid var(--survey-template-color) !important;
    font-weight: 500;
}

.answer-input {
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    position: relative;
    transition: all 0.2s ease;
}

.answer-input:hover {
    border-color: var(--survey-template-color);
}

.answer-input:checked {
    background-color: var(--survey-template-color);
    border-color: var(--survey-template-color);
}

/* CSS-drawn checkmark (more reliable than font icons) */
.answer-input:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Radio buttons - circular with checkmark */
.answer-input[type="radio"] {
    border-radius: 50%;
}

.answer-text {
    cursor: pointer;
    line-height: 1.25;
    color: inherit;
    font-size: 18px;
}

/* Legacy support for custom-control (if still used anywhere) */
.custom-control {
    min-height: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-control-input {
    width: 20px;
    height: 20px;
}

.custom-control-label {
    padding-left: 2px;
    cursor: pointer;
    line-height: 1.25;
    color: var(--survey-template-color);
    font-size: 18px;
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--survey-template-color);
    border-color: var(--survey-template-color);
}

.btn-custom {
    background-color: var(--survey-template-color);
    border-color: var(--survey-template-color);
    color: white;
    font-size: 18px;
    padding: 12px 40px;
    font-weight: 500;
}

.btn-custom:hover {
    background-color: var(--survey-template-color);
    border-color: var(--survey-template-color);
    opacity: 0.9;
}

#survey_body .form-control {
    font-size: 16px;
    color: var(--survey-template-color);
    padding: 10px 15px;
}

#survey_body textarea.form-control {
    min-height: 120px;
}

#survey_body label {
    color: var(--survey-template-color);
    font-weight: 400;
    margin-bottom: 8px;
}

/* Star Rating Component Styles */

.star-label-item {
    padding: 0 5px;
}

.star-input-item {
    padding: 0 5px;
}

.star-label {
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.star-label:hover {
    transform: scale(1.1);
}

.star-icon {
    fill: transparent;
    stroke: var(--survey-template-color, #ccc);
    transition: all 0.2s ease;
}

.star-radio-input:checked ~ .star-label .star-icon,
.star-label.filled .star-icon {
    fill: var(--survey-template-color, #f39c12);
    stroke: var(--survey-template-color, #f39c12);
}

@media (max-width: 576px) {
    .star-label-item .label-text {
        font-size: 11px !important;
    }

    .star-icon {
        width: 30px;
        height: 30px;
    }

    .star-rating-container {
        max-width: 100%;
    }
}


.nps-scale {
    gap: 1px;
}

.nps-option {
    cursor: pointer;
    margin: 0;
}

.nps-box {
    height: 50px;
    border: 2px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 16px;
    color: #495057;
    background-color: #fff;
    transition: all 0.2s ease;
    user-select: none;
}

.nps-option:hover .nps-box {
    border-color: var(--survey-template-color);
    background-color: #f8f9fa;
}

.nps-option input:checked + .nps-box {
    background-color: var(--survey-template-color);
    border-color: var(--survey-template-color);
    color: white;
}

.nps-scale.has-error .nps-box {
    border-color: #dc3545;
}

.nps-scale.has-error .nps-option:hover .nps-box {
    border-color: #dc3545;
    background-color: #fff5f5;
}

@media (max-width: 768px) {
    .nps-box {
        height: 40px;
        font-size: 14px;
    }
}

h4 {
    color: var(--survey-template-color) !important;
    font-weight: normal !important;
}

.btn-custom {
    background-color: var(--survey-template-color);
    border-color: var(--survey-template-color);
    color: white;
}

.survey-success-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.success-message-wrapper {
    margin: 40px 0;
}

.success-message {
    color: var(--survey-template-color);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.5;
}

.redirect-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.countdown-circle {
    display: inline-block;
}

.survey-header-text {
    font-size: 1.1rem;
    color: var(--survey-template-color, #494949);
    white-space: pre-line;
    max-width: 800px;
    margin: 0 auto;
}
