/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* Review Form Container */
#idl-reviews-container {
    max-width: 800px;
    margin: 20px 0;
}

#idl-review-form-container {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e1e1e1;
}

#idl-review-form-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
}

/* Form Groups */
.idl-form-group {
    margin-bottom: 20px;
}

.idl-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

/* Star Rating Styles */
.idl-star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
    margin-bottom: 10px;
}

.idl-star-rating input[type="radio"] {
    display: none;
}

.idl-star-rating label {
    font-size: 30px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
    margin-bottom: 0 !important;
    font-weight: normal !important;
    user-select: none;
}

.idl-star-rating label:hover,
.idl-star-rating label.hover {
    color: #ffc107;
}

.idl-star-rating input[type="radio"]:checked ~ label,
.idl-star-rating input[type="radio"]:checked ~ label ~ label {
    color: #ffc107;
}

/* Form Inputs */
#travel_agent,
#review_text {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Dropdown specific styling */
select#travel_agent {
    background: white;
    cursor: pointer;
    height: auto;
}

select#travel_agent option {
    padding: 8px;
}

#travel_agent:focus,
#review_text:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

/* No agents message */
.idl-no-agents {
    color: #d63638;
    font-style: italic;
    margin: 0;
    padding: 12px;
    background: #fcf0f1;
    border: 1px solid #f1aeb5;
    border-radius: 4px;
}

#review_text {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

/* Submit Button */
#idl-submit-review {
    background: #007cba;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

#idl-submit-review:hover {
    background: #005a87;
}

#idl-submit-review:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Messages */
.idl-message {
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
}

.idl-message-success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #a3cfbb;
}

.idl-message-error {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

/* Login Message */
.idl-login-message {
    text-align: center;
    padding: 20px;
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    margin: 20px 0;
}

.idl-login-message a {
    color: #007cba;
    text-decoration: none;
    font-weight: 600;
}

.idl-login-message a:hover {
    text-decoration: underline;
}

/* Reviews Display */
#idl-reviews-list {
    margin-top: 40px;
}

#idl-reviews-list h3 {
    margin-bottom: 25px;
    color: #333;
    font-size: 24px;
    border-bottom: 3px solid #007cba;
    padding-bottom: 12px;
    font-weight: 600;
}

.idl-review-item {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s ease;
}

.idl-review-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.idl-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.idl-reviewer-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 18px;
    text-transform: capitalize;
}

.idl-review-rating {
    color: #ffc107;
    font-size: 20px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.idl-travel-agent {
    margin-bottom: 15px;
    font-size: 15px;
    color: #34495e;
    background: #ecf0f1;
    padding: 8px 12px;
    border-radius: 5px;
    border-left: 4px solid #007cba;
}

.idl-travel-agent strong {
    color: #2c3e50;
}

.idl-review-text {
    line-height: 1.7;
    color: #444;
    font-size: 16px;
    margin-bottom: 0;
    text-align: justify;
}

#idl-no-reviews {
    text-align: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-size: 16px;
}

.idl-review-item {
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

.idl-reviewer-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.idl-review-rating {
    color: #ffc107;
    font-size: 18px;
}

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

.idl-travel-agent {
    margin-bottom: 12px;
    color: #555;
    font-size: 14px;
}

.idl-travel-agent strong {
    color: #333;
}

.idl-review-text {
    color: #444;
    line-height: 1.6;
    font-size: 15px;
}

#idl-no-reviews {
    text-align: center;
    padding: 40px 20px;
    background: #f8f8f8;
    border-radius: 6px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    #idl-review-form-container {
        padding: 20px 15px;
    }
    
    .idl-star-rating label {
        font-size: 25px;
    }
    
    .idl-review-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .idl-review-rating {
        order: -1;
    }
}

@media (max-width: 480px) {
    #idl-reviews-container {
        margin: 10px 0;
    }
    
    #idl-review-form-container {
        padding: 15px 10px;
    }
    
    .idl-star-rating label {
        font-size: 22px;
    }
    
    .idl-review-item {
        padding: 15px;
    }
}

/* IDL Reviews Container */
#idl-reviews-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
}

/* Login Message */
.idl-login-message {
    background: #f7f7f7;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    margin-bottom: 20px;
}

.idl-login-message a {
    color: #0073aa;
    text-decoration: none;
}

.idl-login-message a:hover {
    text-decoration: underline;
}

/* Review Form */
#idl-review-form-container {
    background: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#idl-review-form-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

.idl-form-group {
    margin-bottom: 20px;
}

.idl-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.idl-form-group input[type="text"],
.idl-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.idl-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Star Rating */
.idl-star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.1em;
    margin: 10px 0;
}

.idl-star-rating input {
    display: none;
}

.idl-star-rating label {
    cursor: pointer;
    font-size: 2em;
    color: #ddd;
    transition: color 0.2s ease;
    margin-bottom: 0 !important;
    font-weight: normal !important;
}

.idl-star-rating label:hover,
.idl-star-rating label.hover {
    color: #ffc107;
}

.idl-star-rating input:checked ~ label {
    color: #ffc107;
}

.idl-star-rating[data-rating="1"] label:nth-child(10) { color: #ffc107; }
.idl-star-rating[data-rating="2"] label:nth-child(8) ~ label { color: #ffc107; }
.idl-star-rating[data-rating="3"] label:nth-child(6) ~ label { color: #ffc107; }
.idl-star-rating[data-rating="4"] label:nth-child(4) ~ label { color: #ffc107; }
.idl-star-rating[data-rating="5"] label:nth-child(2) ~ label { color: #ffc107; }

/* Submit Button */
#idl-submit-review {
    background: #0073aa;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#idl-submit-review:hover {
    background: #005a87;
}

#idl-submit-review:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Messages */
.idl-message {
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
}

.idl-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.idl-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Reviews List */
#idl-reviews-list {
    margin-top: 30px;
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    #idl-reviews-container {
        padding: 0 15px;
    }
    
    #idl-reviews-list h3 {
        font-size: 20px;
    }
    
    .idl-review-item {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
    
    .idl-review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .idl-reviewer-name {
        font-size: 16px;
    }
    
    .idl-review-rating {
        font-size: 18px;
    }
    
    .idl-travel-agent {
        font-size: 14px;
        padding: 6px 10px;
    }
    
    .idl-review-text {
        font-size: 15px;
    }
    
    .idl-star-rating {
        justify-content: flex-start;
    }
    
    .idl-star-rating label {
        font-size: 1.5em;
    }
}