/**
 * Ratings Styles for Physician Panel Manager
 */

/* Star Display */
.ppm-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.ppm-star {
    font-size: 18px;
    line-height: 1;
}

.ppm-star-full {
    color: #f5a623;
}

.ppm-star-half {
    color: #f5a623;
    position: relative;
}

.ppm-star-empty {
    color: #ddd;
}

.ppm-rating-number {
    font-size: 14px;
    color: #666;
    margin-left: 5px;
}

.ppm-no-rating {
    color: #999;
    font-style: italic;
    font-size: 14px;
}

/* Rating Display on Cards */
.ppm-rating-display {
    margin: 10px 0;
    padding: 10px 0;
    border-top: 1px solid #eee;
}

.ppm-rating-compact {
    padding: 5px 0;
    margin: 5px 0;
}

.ppm-overall-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ppm-rating-count {
    font-size: 13px;
    color: #666;
}

/* DOCWISE Badge */
.ppm-docwise-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2e5984 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.ppm-docwise-icon {
    background: #fff;
    color: #1e3a5f;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Clickable Rating */
.ppm-clickable-rating {
    cursor: pointer;
    transition: opacity 0.2s;
}

.ppm-clickable-rating:hover {
    opacity: 0.8;
}

.ppm-view-breakdown-hint {
    font-size: 11px;
    color: #888;
    margin-left: 5px;
}

/* Breakdown Modal */
.ppm-breakdown-modal {
    position: fixed;
    z-index: 100002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.ppm-breakdown-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
}

.ppm-breakdown-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.ppm-breakdown-modal-close:hover {
    color: #000;
}

/* Breakdown Popup Content */
.ppm-breakdown-popup-content {
    padding: 25px;
}

.ppm-breakdown-popup-content h3 {
    margin: 0 0 5px 0;
    color: #1e3a5f;
    font-size: 20px;
    padding-right: 30px;
}

.ppm-breakdown-location {
    color: #666;
    margin: 0 0 20px 0;
    font-size: 14px;
}

.ppm-breakdown-overall {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ppm-breakdown-big-number {
    display: block;
    font-size: 48px;
    font-weight: bold;
    color: #1e3a5f;
    line-height: 1;
}

.ppm-breakdown-overall-stars {
    display: block;
    margin: 10px 0;
}

.ppm-breakdown-overall-stars .ppm-star {
    font-size: 24px;
}

.ppm-breakdown-total {
    color: #666;
    font-size: 14px;
}

.ppm-breakdown-docwise {
    text-align: center;
    margin-bottom: 20px;
}

.ppm-breakdown-categories h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.ppm-breakdown-table {
    width: 100%;
    border-collapse: collapse;
}

.ppm-breakdown-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.ppm-breakdown-table tr:last-child {
    border-bottom: none;
}

.ppm-breakdown-table td {
    padding: 10px 5px;
    vertical-align: middle;
}

.ppm-breakdown-cat-name {
    font-size: 13px;
    color: #333;
    width: 50%;
}

.ppm-breakdown-cat-stars {
    text-align: center;
}

.ppm-breakdown-cat-stars .ppm-star {
    font-size: 14px;
}

.ppm-breakdown-cat-avg {
    text-align: right;
    font-weight: 600;
    color: #1e3a5f;
    width: 40px;
}

.ppm-breakdown-cat-count {
    text-align: right;
    color: #888;
    font-size: 12px;
    width: 40px;
}

.ppm-no-ratings-yet {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.ppm-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Rate Button */
.ppm-rate-btn {
    margin-top: 10px;
}

.ppm-button-small {
    padding: 5px 12px;
    font-size: 13px;
}

.ppm-login-to-rate {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: #1e3a5f;
    text-decoration: none;
}

.ppm-login-to-rate:hover {
    text-decoration: underline;
}

/* Rating Form Container */
.ppm-rating-form-container {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 700px;
    margin: 20px auto;
}

.ppm-rating-form-container h3 {
    margin: 0 0 10px 0;
    color: #1e3a5f;
}

.ppm-rating-intro {
    color: #666;
    margin-bottom: 25px;
}

/* Rating Categories Form */
.ppm-rating-categories-form {
    margin-bottom: 25px;
}

.ppm-rating-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 10px;
}

.ppm-rating-category-row:last-child {
    border-bottom: none;
}

.ppm-category-label {
    font-weight: 500;
    color: #333;
    flex: 1;
    min-width: 200px;
}

/* Star Input */
.ppm-star-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ppm-star-select {
    display: flex;
    gap: 3px;
}

.ppm-star-option {
    font-size: 24px;
    cursor: pointer;
    color: #ddd;
    transition: color 0.15s, transform 0.1s;
    user-select: none;
}

.ppm-star-option:hover {
    transform: scale(1.1);
}

.ppm-star-option.active,
.ppm-star-option.hover {
    color: #f5a623;
}

.ppm-star-input.selected-na .ppm-star-option {
    color: #ddd !important;
}

/* N/A and Clear Buttons */
.ppm-na-btn {
    padding: 4px 10px;
    font-size: 12px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.15s;
}

.ppm-na-btn:hover {
    background: #e0e0e0;
}

.ppm-na-btn.active {
    background: #1e3a5f;
    color: #fff;
    border-color: #1e3a5f;
}

.ppm-clear-btn {
    padding: 4px 8px;
    font-size: 12px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    transition: color 0.15s;
}

.ppm-clear-btn:hover {
    color: #d63638;
}

/* Comments Section */
.ppm-rating-comments {
    margin-top: 20px;
}

.ppm-rating-comments label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.ppm-rating-comments textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
}

.ppm-rating-comments textarea:focus {
    border-color: #1e3a5f;
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.ppm-field-hint {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

/* Rating Breakdown */
.ppm-rating-breakdown {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.ppm-rating-breakdown h4 {
    margin: 0 0 15px 0;
    color: #1e3a5f;
}

.ppm-rating-categories {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ppm-rating-category {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.ppm-rating-category:last-child {
    border-bottom: none;
}

.ppm-category-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ppm-category-count {
    font-size: 12px;
    color: #888;
}

.ppm-na {
    color: #999;
    font-style: italic;
    font-size: 13px;
}

/* My Ratings Table */
.ppm-my-ratings {
    max-width: 800px;
    margin: 20px auto;
}

.ppm-ratings-table {
    width: 100%;
    border-collapse: collapse;
}

.ppm-ratings-table th,
.ppm-ratings-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.ppm-ratings-table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Rating Modal */
.ppm-rating-modal {
    position: fixed;
    z-index: 100001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.ppm-rating-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.ppm-rating-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 10;
}

.ppm-rating-modal-close:hover {
    color: #000;
}

/* Responsive */
@media (max-width: 600px) {
    .ppm-rating-category-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ppm-star-input {
        width: 100%;
        justify-content: flex-start;
    }
    
    .ppm-star-option {
        font-size: 28px;
    }
}
