/**
 * Rating Button Styles - Customizable
 *
 * This file contains the styling for the assessment rating buttons.
 * You can customize these styles to match your site's design.
 */

/* Rating Scale Container */
.eoncore-rating-scale {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Rating Options Container */
.eoncore-rating-options {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

/* Individual Rating Option */
.eoncore-rating-option {
    flex: 1;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-height: 76px; /* 48px square + 6px gap + 22px label space */
}

/* Hide the actual radio input */
.eoncore-rating-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

/* Custom Square with Value */
.eoncore-rating-square {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96%;
    height: 48px;
    background: #ffffff;
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    font-size: 20px;
    font-weight: bold;
    color: #666;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Hover State */
.eoncore-rating-option:hover .eoncore-rating-square {
    background: #f0f7ff;
    border-color: #2271b1;
    color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.2);
}

/* Selected/Checked State */
.eoncore-rating-option input[type="radio"]:checked + .eoncore-rating-square {
    background: #2271b1;
    border-color: #2271b1;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.4);
    transform: scale(1.05);
}

/* Focus State for Accessibility */
.eoncore-rating-option input[type="radio"]:focus + .eoncore-rating-square {
    outline: 3px solid #2271b1;
    outline-offset: 2px;
}

/* Optional: Add a checkmark or icon to selected state */
.eoncore-rating-option input[type="radio"]:checked + .eoncore-rating-square::after {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #46b450;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #ffffff;
}

/* Rating Labels (1-5 indicators) */
.eoncore-rating-labels {
    display: none; /* Hide since values are now in the squares */
}

/* Text Labels for Min/Max Ratings */
.eoncore-rating-label {
    display: block;
    font-size: 10px;
    color: #666;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    word-wrap: break-word;
    font-weight: 500;
    margin-top: 2px;
    height: 22px;
}

/* Hover state for labels */
.eoncore-rating-option:hover .eoncore-rating-label {
    color: #2271b1;
    font-weight: 600;
}

/* Selected state for labels */
.eoncore-rating-option input[type="radio"]:checked ~ .eoncore-rating-label {
    color: #2271b1;
    font-weight: 700;
}

/* Responsive Design for Mobile */
@media (max-width: 768px) {
    .eoncore-rating-scale {
        gap: 6px;
    }

    .eoncore-rating-square {
        width: 96%;
        height: 38px;
        font-size: 16px;
        border-radius: 4px;
    }

    .eoncore-rating-options {
        gap: 5px;
    }

    .eoncore-rating-option {
        gap: 4px;
        min-height: 58px; /* 38px square + 4px gap + 16px label space */
    }

    .eoncore-rating-label {
        font-size: 8px;
        height: 16px;
        line-height: 1.1;
    }

    .eoncore-rating-option input[type="radio"]:checked + .eoncore-rating-square::after {
        width: 14px;
        height: 14px;
        top: -5px;
        right: -5px;
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .eoncore-rating-square {
        width: 96%;
        height: 36px;
        font-size: 15px;
    }

    .eoncore-rating-options {
        gap: 4px;
    }

    .eoncore-rating-option {
        gap: 3px;
        min-height: 53px; /* 36px square + 3px gap + 14px label space */
    }

    .eoncore-rating-label {
        font-size: 7px;
        height: 14px;
    }
}

/* ============================================
   CUSTOMIZATION VARIABLES
   Adjust these values to match your theme
   ============================================ */

/*
   To customize colors, replace these in the styles above:

   - Default Background: #ffffff (white)
   - Default Border: #d0d0d0 (light gray)
   - Default Text: #666 (dark gray)

   - Hover Background: #f0f7ff (light blue)
   - Hover Border: #2271b1 (blue)
   - Hover Text: #2271b1 (blue)

   - Selected Background: #2271b1 (blue)
   - Selected Border: #2271b1 (blue)
   - Selected Text: #ffffff (white)

   - Checkmark Background: #46b450 (green)

   You can also adjust:
   - Border radius: 8px (more/less rounded)
   - Square size: 60px x 60px
   - Font size: 24px
   - Gap between squares: 10px
*/

/* ============================================
   ALTERNATIVE STYLE EXAMPLES
   Uncomment sections below to try different styles
   ============================================ */

/* EXAMPLE 1: Larger Squares with More Rounding */
/*
.eoncore-rating-square {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    font-size: 28px;
}
*/

/* EXAMPLE 2: Pill/Capsule Shape */
/*
.eoncore-rating-square {
    width: 55px;
    height: 55px;
    border-radius: 50%;
}
*/

/* EXAMPLE 3: Minimal Flat Design (No Shadows) */
/*
.eoncore-rating-square {
    box-shadow: none;
}

.eoncore-rating-option:hover .eoncore-rating-square {
    box-shadow: none;
}

.eoncore-rating-option input[type="radio"]:checked + .eoncore-rating-square {
    box-shadow: none;
}
*/

/* EXAMPLE 4: Remove Checkmark */
/*
.eoncore-rating-option input[type="radio"]:checked + .eoncore-rating-square::after {
    display: none;
}
*/

/* EXAMPLE 5: Different Color Scheme (Green) */
/*
.eoncore-rating-option:hover .eoncore-rating-square {
    background: #f0fff4;
    border-color: #46b450;
    color: #46b450;
}

.eoncore-rating-option input[type="radio"]:checked + .eoncore-rating-square {
    background: #46b450;
    border-color: #46b450;
    color: #ffffff;
}
*/

/* EXAMPLE 6: Gradient Background for Selected */
/*
.eoncore-rating-option input[type="radio"]:checked + .eoncore-rating-square {
    background: linear-gradient(135deg, #2271b1 0%, #1a5a8a 100%);
}
*/
