/* ============================================
   ADT REVIEW SYSTEM - CLEAN & SIMPLE STYLES
   ============================================ */

/* Review Button */
.adt-review-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #b02b2b;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}

.adt-review-button:hover {
    background-color: #005a87;
    color: white !important;
    text-decoration: none;
}

/* Modal Styles */
.adt-review-modal .modal-content {
    max-width: 700px;
    width: 90%;
    border-radius: 8px;
}

.adt-review-modal h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

/* Form Basics */
.adt-review-form .form-group {
    margin-bottom: 20px;
}

.adt-review-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.adt-review-form .required {
    color: #e74c3c;
}

.adt-review-form .optional {
    color: #666;
    font-weight: 400;
    font-size: 14px;
}

/* ============================================
   STAR RATING - SIMPLE & CLEAN
   ============================================ */

/* Complete WooCommerce override - remove all pseudo-elements */
.adt-review-form .star-rating:before,
.adt-review-form .star-rating:after,
.adt-review-modal .star-rating:before,
.adt-review-modal .star-rating:after,
.woocommerce-page .adt-review-form .star-rating:before,
.woocommerce-page .adt-review-modal .star-rating:before {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Reset all WooCommerce interference */
.adt-review-form .star-rating,
.adt-review-modal .star-rating {
    /* Remove all inherited styles */
    all: unset !important;
    
    /* Set our own layout */
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 15px !important;
    overflow: visible !important;
    width: auto !important;
    height: auto !important;
}

/* Hide radio inputs */
.adt-review-form .star-rating input[type="radio"],
.adt-review-modal .star-rating input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Star styling - SVG Trustpilot-style stars */
.adt-review-form .star-rating .star,
.adt-review-modal .star-rating .star {
    /* Reset everything */
    all: unset !important;
    
    /* Our styling */
    width: 42px !important;
    height: 42px !important;
    color: #ddd !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    user-select: none !important;
}

.adt-review-form .star-rating .star svg,
.adt-review-modal .star-rating .star svg {
    width: 42px !important;
    height: 42px !important;
    transition: all 0.2s ease !important;
}

/* Star hover */
.adt-review-form .star-rating .star:hover,
.adt-review-modal .star-rating .star:hover {
    transform: scale(1.1) !important;
}

.adt-review-form .star-rating .star:hover svg,
.adt-review-modal .star-rating .star:hover svg {
    transform: scale(1.1) !important;
}

/* Star states */
.adt-review-form .star-rating .star.filled,
.adt-review-form .star-rating .star.hover-fill,
.adt-review-modal .star-rating .star.filled,
.adt-review-modal .star-rating .star.hover-fill {
    color: #b02b2c !important;
}

.adt-review-form .star-rating .star.active,
.adt-review-modal .star-rating .star.active {
    color: #b02b2c !important;
    transform: scale(1.2) !important;
}

.adt-review-form .star-rating .star.active svg,
.adt-review-modal .star-rating .star.active svg {
    transform: scale(1.2) !important;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

.adt-review-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
}

.adt-review-form textarea:focus {
    outline: none;
    border-color: #b02b2b;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

/* Anonymity Checkbox */
.adt-review-form .form-group label input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
    position: relative;
    top: 2px;
}

.adt-review-form .form-group label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    margin-bottom: 5px;
}

.adt-review-form .form-help {
    display: block;
    font-size: 12px;
    color: #666;
    text-align: left;
    margin-top: -14px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.form-actions .button {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.form-actions .button.primary {
    background-color: #b02b2b;
    color: white;
}

.form-actions .button.primary:hover {
    background-color: #005a87;
}

.form-actions .button.secondary {
    background-color: #f7f7f7;
    color: #333;
    border: 1px solid #ddd;
}

.form-actions .button.secondary:hover {
    background-color: #eee;
}

/* ============================================
   SUCCESS MESSAGE
   ============================================ */

.review-success-message {
    text-align: center;
    padding: 20px;
}

.review-success-message p {
    color: #b02b2c;
    font-size: 16px;
    margin: 0;
}

/* ============================================
   REVIEWS DISPLAY
   ============================================ */

.reviews-summary {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.rating-number {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars .star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.rating-stars .star svg {
    width: 20px;
    height: 20px;
}

.rating-stars .star.filled {
    color: #b02b2c;
}

.rating-stars .star.empty {
    color: #ddd;
}

.review-count {
    color: #666;
    font-size: 14px;
}

/* Individual Reviews */
.review-item {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: white;
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.reviewer-name {
    font-weight: 600;
    color: #333;
}

.review-rating {
    display: flex;
    gap: 2px;
}

.review-rating .star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    color: #b02b2c;
}

.review-rating .star svg {
    width: 16px;
    height: 16px;
}

.review-date {
    color: #666;
    font-size: 13px;
}

.review-text {
    color: #555;
    line-height: 1.5;
    margin-top: 10px;
}

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

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .adt-review-modal .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
        max-width: none;
    }
    
    .adt-review-form .star-rating .star,
    .adt-review-modal .star-rating .star {
        width: 36px !important;
        height: 36px !important;
    }
    
    .adt-review-form .star-rating .star svg,
    .adt-review-modal .star-rating .star svg {
        width: 36px !important;
        height: 36px !important;
    }
    
    .adt-review-form .star-rating,
    .adt-review-modal .star-rating {
        justify-content: center !important;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .average-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   MY ACCOUNT REVIEWS & OBJECTIONS
   ============================================ */

/* Objection button styling */
.objection-btn {
    background-color: #dc3545 !important;
    color: white !important;
    border: 1px solid #dc3545 !important;
    padding: 5px 12px !important;
    font-size: 12px !important;
    border-radius: 3px !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.objection-btn:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    color: white !important;
}

/* Objection form styling */
.adt-objection-form {
    margin-top: 15px;
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
}

.adt-objection-form .form-group {
    margin-bottom: 15px;
}

.adt-objection-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #856404;
}

.adt-objection-form select,
.adt-objection-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.adt-objection-form select:focus,
.adt-objection-form textarea:focus {
    outline: none;
    border-color: #856404;
    box-shadow: 0 0 0 2px rgba(133, 100, 4, 0.1);
}

.adt-objection-form .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.adt-objection-form .button.primary {
    background-color: #dc3545;
    border-color: #dc3545;
}
.adt-review-form label{
    text-align:left;
}
.adt-objection-form .button.primary:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Status indicators */
.objection-status {
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 3px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.objection-deadline {
    color: #dc3545;
    font-size: 12px;
}

.objection-expired {
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
}

/* Success message for My Account */
.woocommerce-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* ============================================
   ADMIN STYLES FOR OBJECTIONS
   ============================================ */

.objection-item {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.objection-item h3 {
    color: #333;
    font-size: 18px;
}

.objection-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.review-info,
.objection-info {
    padding: 0;
}

.review-info h4,
.objection-info h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    border-bottom: 2px solid #eee;
    padding-bottom: 5px;
}

.objection-decision {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.objection-decision h4 {
    margin: 0 0 15px 0;
    color: #495057;
}

.objection-decision textarea {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    resize: vertical;
}

.objection-decision .button {
    padding: 8px 15px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.objection-decision-result {
    border-radius: 5px;
    padding: 15px;
}

/* Responsive for admin */
@media (max-width: 1200px) {
    .objection-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .objection-decision form > div:last-child {
        flex-direction: column;
    }
    
    .objection-decision .button {
        width: 100%;
        margin-bottom: 10px;
    }
}