/* Feedback Modal Styles */
.feedback-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition:
            opacity 0.3s ease,
            visibility 0.3s ease;
}

.feedback-modal label {
    display: block;
}

.feedback-modal h2 {
    color: #28b697;
    font-size: 30px;
    line-height: calc(38 / 30);
    text-align: center;
}

@media (max-width: 640px) {
    .feedback-modal h2 {
        font-size: 22px;
        margin-bottom: 16px;
    }
}


.feedback-modal--hidden {
    opacity: 0;
    visibility: hidden;
}

.feedback-modal--visible {
    opacity: 1;
    visibility: visible;
}

.feedback-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.feedback-modal__content {
    background: white;
    width: 90%;
    max-width: 510px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    z-index: 10;
    padding: 40px 30px;
}

.feedback-modal--visible .feedback-modal__content {
    transform: translateY(0);
}

.feedback-modal__header {
    /*background-color: #10b981; !* green-500 *!*/
    /*color: white;*/

    padding: 1rem 1.5rem;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.feedback-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
    background: url(../assets/images/icons/close-but.svg) center center no-repeat;
    width: 20px;
    height: 20px;
    text-indent: -9000px;
    overflow: hidden;
    transition: all 0.15s;
}
.feedback-modal__close:hover {
    transform: scale(1.15);
}

.feedback-modal__close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.feedback-modal__body {
}

/* Success state */
.feedback-success {
    text-align: center;
    padding: 2rem;
    padding-top: 0;
}

.feedback-success--hidden {
    display: none;
}

.feedback-success--visible {
    display: block;
}

/* Form styling overrides */
.feedback-modal button:disabled {
    background-color: #efefef !important;
    color: #a4acb6 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* Star Rating Styles */
.star-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.star-rating-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 0.5rem;
}

.star-rating-labels span {
    font-size: 0.875rem;
    color: #6b7280;
}

.stars-container {
    display: flex;
    gap: 0.25rem;
}

.star {
    width: 28px;
    height: 26px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    background-image: url("../assets/images/icons/star.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    text-indent: -9999px;
    overflow: hidden;
    /* Remove default button styling */
    border: none;
    background-color: transparent;
    padding: 0;
    margin: 0;
    outline: none;
}

/* Focus styling for accessibility - only for keyboard navigation */
.star:focus {
    outline: 2px solid #25aa8d;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Remove focus outline when clicked with mouse */
.star:focus:not(:focus-visible) {
    outline: none;
}

/* Default state - gray outline */
.star {
    filter: none;
}

/* Hover and active states - green fill */
.star.hover,
.star.active,
.star[aria-checked="true"] {
    background-image: url("data:image/svg+xml,%3Csvg width='28' height='26' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.43 9.905l.169.519h8.408l-6.363 4.622-.44.32.168.518 2.43 7.478-6.362-4.62-.44-.321-.44.32-6.363 4.621 2.43-7.478.169-.518-.44-.32-6.363-4.622h8.408l.17-.519L14 2.425l2.43 7.48z' stroke='%2325AA8D' stroke-width='1.5' fill='%2325AA8D'/%3E%3C/svg%3E");
}

/* Character counter */
.character-counter {
    text-align: right;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Error message */
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 4px;
}

/* Success message */
.success-content {
    text-align: center;
    padding: 2rem;
}

.success-content h3 {
    color: #10b981;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Form Elements Styling - Match FacetWP Design */
.feedback-modal select,
.feedback-modal textarea {
    border: 2px solid #dadee3;
    border-radius: 3px;
    background: #fff;
    font-size: 1rem;
    line-height: 1.75;
    font-weight: 400;
    padding: 0.25rem 0.625rem;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.feedback-modal select {
    appearance: none;
    background-image: url("../assets/images/icons/chevron.svg");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    background-size: 15px 9px;
    padding-right: 2.5rem;
    cursor: pointer;
    height: 44px;
}

.feedback-modal select:focus,
.feedback-modal textarea:focus {
    outline: 2px solid #25aa8d;
    border-color: #25aa8d;
}

.feedback-modal textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    width: 100%;
}

.feedback-modal select:disabled {
    color: #a4acb6;
    cursor: not-allowed;
    background-color: #f9f9f9;
}

/* Form Group Styling */
.feedback-modal .form-group {
    display: flex;
    flex-direction: column;
    /* gap: 0.5rem; */
}

.feedback-modal .form-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

/* Ensure feedback form maintains grid layout */
.feedback-modal .feedback-form {
    display: grid !important;
}

/* Star Rating Layout Updates */
.feedback-modal .star-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 0;
}

/* Character Counter Styling */
.feedback-modal .character-counter {
    text-align: right;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .feedback-modal-content {
        width: 95%;
        margin: 1rem;
    }

    .feedback-modal-header {
        padding: 1rem;
    }

    .feedback-modal-body {
        padding: 1rem;
    }

    .star-rating-labels {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
}
