/* ==========================================================
   HELCU — COMMON RATING

   Used by:
   Doctor | Pharmacy | Clinic | Hospital | Healthcare | Care

   FILE:
   main/static/css/common/rating/rating.css

   RESPONSIBILITY:
   ----------------------------------------------------------
   SweetAlert2 Rating Popup
   Rating Stars
   Rating Buttons
   Rating Messages

   REVIEW UI:
   ----------------------------------------------------------
   NOT USED
   ========================================================== */


/* ==========================================================
   SWEETALERT2
   MOBILE FIRST

   0px → 767.98px
========================================================== */

.hc-rating-swal-popup {
    width: min(92vw, 360px) !important;

    margin: 0 auto !important;

    padding: 22px 18px 20px !important;

    box-sizing: border-box;

    border-radius: 16px !important;
}


/* ==========================================================
   TITLE
========================================================== */

.hc-rating-swal-title {
    margin: 0 0 18px !important;

    padding: 0 !important;

    font-size: 19px !important;

    font-weight: 700 !important;

    line-height: 1.3 !important;

    color: #1F2937 !important;

    text-align: center;
}


/* ==========================================================
   SWEETALERT CONTENT
========================================================== */

.hc-rating-swal-content {
    width: 100% !important;

    margin: 0 !important;

    padding: 0 !important;

    box-sizing: border-box;
}


/* ==========================================================
   RATING STAR SELECTOR
========================================================== */

.cf-rating-select {
    display: flex;

    align-items: center;

    justify-content: center;

    gap: 6px;

    width: 100%;

    margin: 0 auto 16px;

    padding: 0;

    box-sizing: border-box;
}


/* ==========================================================
   RATING STAR BUTTON
========================================================== */

.cf-rating-star {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    flex: 0 0 auto;

    width: 42px;

    height: 42px;

    margin: 0;

    padding: 0;

    border: 0;

    border-radius: 8px;

    background: transparent;

    color: #D1D5DB;

    font-size: 29px;

    line-height: 1;

    cursor: pointer;

    box-sizing: border-box;

    -webkit-tap-highlight-color: transparent;

    touch-action: manipulation;

    transition:
        color 0.18s ease,
        background-color 0.18s ease,
        transform 0.18s ease;
}


/* ==========================================================
   STAR ICON
========================================================== */

.cf-rating-star i {
    display: block;

    font-size: inherit;

    line-height: 1;

    pointer-events: none;
}


/* ==========================================================
   STAR HOVER
========================================================== */

.cf-rating-star:hover {
    background: rgba(244, 180, 0, 0.08);

    color: #F4B400;
}


/* ==========================================================
   SELECTED STAR
========================================================== */

.cf-rating-star.selected {
    color: #F4B400;
}


/* ==========================================================
   STAR ACTIVE
========================================================== */

.cf-rating-star:active {
    transform: scale(0.90);
}


/* ==========================================================
   STAR FOCUS
========================================================== */

.cf-rating-star:focus {
    outline: none;
}


.cf-rating-star:focus-visible {
    outline: 2px solid #0F766E;

    outline-offset: 2px;
}


/* ==========================================================
   SELECTED RATING TEXT
========================================================== */

.cf-rating-selected-text {
    min-height: 20px;

    margin: 0 0 18px;

    padding: 0;

    font-size: 13px;

    font-weight: 600;

    line-height: 1.4;

    color: #6B7280;

    text-align: center;

    box-sizing: border-box;
}


/* ==========================================================
   SWEETALERT ACTIONS
========================================================== */

.hc-rating-swal-actions {
    display: flex !important;

    align-items: center;

    justify-content: center;

    gap: 10px;

    width: 100%;

    margin: 2px 0 0 !important;

    padding: 0 !important;

    box-sizing: border-box;
}


/* ==========================================================
   COMMON BUTTON
========================================================== */

.hc-rating-swal-confirm,
.hc-rating-swal-cancel {
    display: inline-flex !important;

    align-items: center;

    justify-content: center;

    flex: 1 1 0;

    min-width: 0;

    min-height: 40px;

    margin: 0 !important;

    padding: 9px 12px !important;

    border: 0 !important;

    border-radius: 8px !important;

    font-size: 13px !important;

    font-weight: 700 !important;

    line-height: 1.2 !important;

    text-align: center;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        background-color 0.18s ease,
        opacity 0.18s ease,
        transform 0.18s ease;
}


/* ==========================================================
   CONFIRM BUTTON
========================================================== */

.hc-rating-swal-confirm {
    background: #0F766E !important;

    color: #FFFFFF !important;
}


/* ==========================================================
   CONFIRM HOVER
========================================================== */

.hc-rating-swal-confirm:hover {
    background: #0D6B64 !important;

    opacity: 0.96;
}


/* ==========================================================
   CANCEL BUTTON
========================================================== */

.hc-rating-swal-cancel {
    background: #E5E7EB !important;

    color: #374151 !important;
}


/* ==========================================================
   CANCEL HOVER
========================================================== */

.hc-rating-swal-cancel:hover {
    background: #D1D5DB !important;
}


/* ==========================================================
   BUTTON ACTIVE
========================================================== */

.hc-rating-swal-confirm:active,
.hc-rating-swal-cancel:active {
    transform: scale(0.97);
}


/* ==========================================================
   BUTTON FOCUS
========================================================== */

.hc-rating-swal-confirm:focus,
.hc-rating-swal-cancel:focus {
    outline: none !important;
}


.hc-rating-swal-confirm:focus-visible,
.hc-rating-swal-cancel:focus-visible {
    outline: 2px solid #0F766E !important;

    outline-offset: 2px;
}


/* ==========================================================
   SWEETALERT VALIDATION MESSAGE
========================================================== */

.hc-rating-swal-popup .swal2-validation-message {
    margin: 10px 0 0 !important;

    padding: 8px 10px !important;

    border-radius: 7px;

    background: rgba(220, 38, 38, 0.08) !important;

    font-size: 12px !important;

    font-weight: 600 !important;

    line-height: 1.4;

    color: #DC2626 !important;
}


/* ==========================================================
   SWEETALERT LOADING STATE
========================================================== */

.hc-rating-swal-popup .swal2-loader {
    border-width: 3px;

    margin: 10px auto;
}


/* ==========================================================
   SUCCESS POPUP
========================================================== */

.hc-rating-swal-popup .swal2-icon.swal2-success {
    margin: 0 auto 12px;
}


/* ==========================================================
   SUCCESS TEXT
========================================================== */

.hc-rating-swal-popup .swal2-html-container {
    font-size: 14px;

    line-height: 1.5;

    color: #4B5563;
}


/* ==========================================================
   TABLET

   768px → 1199.98px
========================================================== */

@media (min-width: 768px) {

    .hc-rating-swal-popup {
        width: min(88vw, 420px) !important;

        padding: 28px 24px 24px !important;

        border-radius: 18px !important;
    }


    /* ======================================================
       TITLE
    ====================================================== */

    .hc-rating-swal-title {
        margin-bottom: 20px !important;

        font-size: 21px !important;
    }


    /* ======================================================
       STARS
    ====================================================== */

    .cf-rating-select {
        gap: 9px;

        margin-bottom: 18px;
    }


    .cf-rating-star {
        width: 48px;

        height: 48px;

        font-size: 34px;
    }


    /* ======================================================
       SELECTED TEXT
    ====================================================== */

    .cf-rating-selected-text {
        margin-bottom: 20px;

        font-size: 14px;
    }


    /* ======================================================
       ACTIONS
    ====================================================== */

    .hc-rating-swal-actions {
        gap: 12px;
    }


    .hc-rating-swal-confirm,
    .hc-rating-swal-cancel {
        flex: 0 1 auto;

        min-width: 112px;

        min-height: 42px;

        padding: 10px 18px !important;

        font-size: 14px !important;

        border-radius: 9px !important;
    }


    /* ======================================================
       VALIDATION
    ====================================================== */

    .hc-rating-swal-popup .swal2-validation-message {
        font-size: 13px !important;
    }

}


/* ==========================================================
   DESKTOP

   1200px+
========================================================== */

@media (min-width: 1200px) {

    .hc-rating-swal-popup {
        width: 440px !important;

        padding: 32px 28px 28px !important;

        border-radius: 20px !important;
    }


    /* ======================================================
       TITLE
    ====================================================== */

    .hc-rating-swal-title {
        margin-bottom: 22px !important;

        font-size: 22px !important;
    }


    /* ======================================================
       STARS
    ====================================================== */

    .cf-rating-select {
        gap: 11px;

        margin-bottom: 20px;
    }


    .cf-rating-star {
        width: 52px;

        height: 52px;

        font-size: 38px;

        border-radius: 9px;
    }


    /* ======================================================
       SELECTED TEXT
    ====================================================== */

    .cf-rating-selected-text {
        margin-bottom: 22px;

        font-size: 14px;
    }


    /* ======================================================
       ACTIONS
    ====================================================== */

    .hc-rating-swal-actions {
        gap: 14px;
    }


    .hc-rating-swal-confirm,
    .hc-rating-swal-cancel {
        min-width: 120px;

        min-height: 44px;

        padding: 11px 20px !important;

        font-size: 14px !important;

        border-radius: 9px !important;
    }


    /* ======================================================
       VALIDATION
    ====================================================== */

    .hc-rating-swal-popup .swal2-validation-message {
        margin-top: 12px !important;

        font-size: 13px !important;
    }

}