/**
 * Smallbox Visitors - Rating Widget Styles
 * Styles for the [sbv_rating] shortcode
 */

.sbv-rating-widget {
    font-family: inherit;
}

.sbv-rating-display {
    display: flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

.sbv-stars-display {
  width: fit-content;
  display: flex;
  gap: 0.2em;
  justify-content: center;
}

.sbv-stars-display .sbv-star {
    width: 1rem;
    height: auto;
    svg {
        stroke-width: 2px;
        fill: none;
        stroke: #e98300;
    }
}

.sbv-stars-display .sbv-star.filled {
    svg {
        fill: #e98300;
    }
}

.sbv-rating-info {
    font-size: 0.9em;
    color: #666;
}

.sbv-rate-button {
    padding: 0.5em 1em;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.sbv-rate-button:hover {
    background: #005a87;
}

/* Modal Styles */
.sbv-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sbv-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
}

.sbv-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.sbv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1em 1em 1em .5em;
    border-bottom: 1px solid #ddd;
}

.sbv-modal-header h3 {
    margin: 0;
    font-size: 1.2em;
}

button.sbv-modal-close {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #999;
    padding: 0 !important;
    width: 30px !important;
    height: 30px !important;
    display: flex;
    flex-grow: 0;
    align-items: center;
    justify-content: center;
}

button.sbv-modal-close svg {
  width: 1em;
  height: auto;
}

button.sbv-modal-close svg path {
  fill: currentColor !important;
}

.sbv-modal-close:hover {
    color: #666;
}

.sbv-modal-body {
    padding: 1.5em;
}

.sbv-stars-input {
    display: flex;
    gap: 0.2em;
    justify-content: center;
    margin: 1em 0;
}

.sbv-star-btn {
    background: none;
    border: none;
    font-size: 2em;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.sbv-star-btn svg {
  pointer-events: none;
}

.sbv-star-btn:hover,
.sbv-star-btn.active {
    color: #ffd700;
}

.sbv-rating-actions,
.sbv-login-actions {
    display: flex;
    gap: 0.5em;
    justify-content: center;
    margin-top: 1.5em;
}

.sbv-submit-rating,
.sbv-cancel-rating {
    padding: 0.5em 1em;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.sbv-submit-rating {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.sbv-submit-rating:hover:not(:disabled) {
    background: #005a87;
}

.sbv-submit-rating:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.sbv-cancel-rating {
    background: white;
    color: #666;
}

.sbv-cancel-rating:hover {
    background: #f5f5f5;
}

.sbv-login-link {
    display: inline-block;
    padding: 0.5em 1em;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
}

.sbv-login-link:hover {
    background: #005a87;
    color: white;
}

.sbv-login-prompt {
    text-align: center;
}

/* Hidden state */
[hidden] {
    display: none !important;
}
