/**
 * SL Survey Public CSS
 * 
 * Styles for the survey modal and form.
 */

/* Modal */
.sl-survey-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.sl-survey-modal.sl-survey-modal-open {
    display: block;
}

.sl-survey-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.sl-survey-modal-container {
    position: relative;
    width: 90%;
    max-width: 1100px;
    max-height: 90vh;
    margin: 5vh auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sl-survey-modal-header {
    padding: 25px 20px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.sl-survey-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
}

.sl-survey-modal-title-container {
    text-align: center;
}

.sl-survey-modal-title {
    margin: 0 0 5px 0;
    font-size: 28px;
    color: var(--primary, #0073aa);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sl-survey-modal-subtitle {
    margin: 0;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.sl-survey-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.sl-survey-modal-close:hover {
    background-color: #eee;
    color: #333;
}

.sl-survey-modal-content {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Progress bar */
.sl-survey-progress {
    margin-bottom: 20px;
}

.sl-survey-progress-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.sl-survey-progress-bar-container {
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.sl-survey-progress-bar {
    height: 100%;
    background-color: var(--primary);
    width: 0;
    transition: width 0.3s ease;
}

/* Form */
.sl-survey-form {
    margin: 0;
}

.sl-survey-step {
    display: none;
}

.sl-survey-step-active {
    display: block;
}

.sl-survey-step-title {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.sl-survey-field {
    margin-bottom: 20px;
}

.sl-survey-field-label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
}

.sl-survey-field-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.sl-survey-field-group {
    margin-bottom: 10px;
}

/* Radio option grid layout */
.sl-survey-field-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

/* This section is intentionally left empty as we're removing the 2-column layout at 1199px */

/* Radio option styling */
.sl-survey-radio-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 0;
    padding: 20px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    aspect-ratio: 1/1;
    box-sizing: border-box;
}

.sl-survey-radio-option:hover {
    border-color: var(--primary, #0073aa);
    background-color: #f8f8f8;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.sl-survey-radio-option input[type="radio"] {
    position: absolute;
    top: 10px;
    left: 10px;
    margin: 0;
}

.sl-survey-radio-option input[type="radio"]:checked+.sl-survey-radio-icon+.sl-survey-radio-option-label {
    color: var(--primary, #0073aa);
    font-weight: 600;
}

.sl-survey-radio-option input[type="radio"]:checked~.sl-survey-radio-icon {
    color: var(--primary, #0073aa);
}

.sl-survey-radio-option input[type="radio"]:checked+.sl-survey-radio-option-label {
    color: var(--primary, #0073aa);
    font-weight: 600;
}

.sl-survey-radio-icon {
    font-size: 36px;
    margin-bottom: 15px;
    color: #666;
    transition: color 0.3s ease;
}

.sl-survey-radio-option-label {
    font-weight: normal;
    cursor: pointer;
    font-size: 18px;
    line-height: 1.4;
    margin-top: 15px;
}

/* Selected radio option */
.sl-survey-radio-option.selected {
    border-color: var(--primary, #0073aa);
    background-color: rgba(0, 115, 170, 0.05);
}

.sl-survey-radio-option.selected .sl-survey-radio-icon {
    color: var(--primary, #0073aa);
}

/* Input fields with icons */
.sl-survey-input-container {
    position: relative;
}

.sl-survey-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 18px;
}

.sl-survey-text-input,
.sl-survey-textarea {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.sl-survey-text-input:focus,
.sl-survey-textarea:focus {
    border-color: var(--primary, #0073aa);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.sl-survey-textarea {
    min-height: 100px;
    resize: vertical;
}

/* Contact preference checkboxes */
.sl-survey-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.sl-survey-checkbox-option {
    display: flex;
    align-items: center;
    background-color: #f8f8f8;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sl-survey-checkbox-option:hover {
    border-color: var(--primary, #0073aa);
    background-color: #f0f7fb;
}

.sl-survey-checkbox-option input[type="checkbox"] {
    margin-right: 10px;
}

.sl-survey-checkbox-icon {
    margin-right: 8px;
    font-size: 18px;
    color: #666;
}

.sl-survey-checkbox-option input[type="checkbox"]:checked+.sl-survey-checkbox-icon {
    color: var(--primary, #0073aa);
}

.sl-survey-checkbox-option input[type="checkbox"]:checked~span {
    color: var(--primary, #0073aa);
    font-weight: 600;
}

/* Navigation */
.sl-survey-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.sl-survey-button {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--primary, #0073aa);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.sl-survey-button-primary {
    background-color: var(--primary, #0073aa);
    color: white;
}

.sl-survey-button-primary:hover {
    background-color: var(--primary, #0073aa);
    opacity: 0.9;
    border-color: var(--primary, #0073aa);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.sl-survey-button-secondary {
    background-color: transparent;
    color: var(--primary, #0073aa);
}

.sl-survey-button-secondary:hover {
    background-color: #f0f7fb;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sl-survey-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.sl-survey-button i {
    font-size: 14px;
}

/* Error messages */
.sl-survey-error {
    color: #d32f2f;
    font-size: 14px;
    margin-top: 5px;
}

.sl-survey-error-message {
    background-color: #ffebee;
    color: #d32f2f;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #d32f2f;
}

/* Thank you message */
.sl-survey-thank-you {
    text-align: center;
    padding: 20px 0;
}

.sl-survey-thank-you h2 {
    color: var(--primary);
    font-size: 28px;
    margin-bottom: 20px;
}

.sl-survey-resources {
    margin-top: 30px;
    text-align: left;
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
}

.sl-survey-resources h3 {
    margin-top: 0;
    color: #333;
    font-size: 20px;
    margin-bottom: 15px;
}

.sl-survey-resources ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sl-survey-resources li {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.sl-survey-resources li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sl-survey-resources a {
    color: var(--primary);
    font-weight: bold;
    text-decoration: none;
    font-size: 18px;
    display: block;
    margin-bottom: 5px;
}

.sl-survey-resources a:hover {
    text-decoration: underline;
}

.sl-survey-resources p {
    margin: 5px 0 0;
    color: #555;
}

.sl-survey-close-button {
    margin-top: 30px;
    display: inline-block;
}

/* Conditional fields */
.sl-survey-conditional-field {
    display: none;
    margin-top: 10px;
    margin-left: 25px;
    padding-left: 10px;
    border-left: 3px solid #e0e0e0;
}

/* Responsive styles */
@media (max-width: 1199px) {

    /* Mobile radio options */
    .sl-survey-field-group {
        grid-template-columns: 1fr;
    }

    .sl-survey-radio-option {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
        padding: 12px 15px;
        aspect-ratio: unset;
        height: auto;
    }

    .sl-survey-radio-icon {
        display: none;
    }

    .sl-survey-radio-option-label {
        margin-top: 0;
        margin-left: 30px;
    }
}

@media (max-width: 768px) {
    .sl-survey-modal-container {
        width: 95%;
        margin: 2.5vh auto;
        max-height: 95vh;
    }

    .sl-survey-modal-title {
        font-size: 20px;
    }

    .sl-survey-step-title {
        font-size: 18px;
    }

    .sl-survey-button {
        padding: 8px 16px;
        font-size: 14px;
    }
}

/* Additional button styles for the block */
.sl-survey-button-small {
    padding: 5px 10px;
    font-size: 14px;
}

.sl-survey-button-medium {
    padding: 10px 20px;
    font-size: 16px;
}

.sl-survey-button-large {
    padding: 15px 30px;
    font-size: 18px;
}

.sl-survey-button-filled {
    color: white;
}

.sl-survey-button-outline {
    background-color: transparent;
}

/* Body class when modal is open */
body.sl-survey-modal-active {
    overflow: hidden;
}

/* Inline Survey Styles */
.sl-survey-inline {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    font-family: inherit;
}

.sl-survey-inline-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sl-survey-inline-header {
    padding: 25px 20px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sl-survey-inline-title-container {
    text-align: center;
}

.sl-survey-inline-title {
    margin: 0 0 5px 0;
    font-size: 28px;
    color: var(--primary, #0073aa);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sl-survey-inline-subtitle {
    margin: 0;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.sl-survey-inline-content {
    padding: 20px;
}