/**
 * CoS Reviews - Frontend Styling
 * Version: 3.0
 */

/* Container */
.cos-review-container {
    width: 100%;
}

/* Header */
.cos-review-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.cos-review-title {
    font-size: 48px;
    color: #ffffff;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.cos-review-description {
    font-size: 18px;
    color: #ffffff;
    font-style: italic;
    line-height: 1.6;
}

/* Form */
.cos-review-form {
    width: 100%;
}

/* Question Block - Glassmorphism */
.cos-review-question {
    margin-bottom: 35px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cos-review-question:last-of-type {
    margin-bottom: 25px;
}

/* Question Header */
.question-header {
    margin-bottom: 15px;
}

.question-title {
    display: block;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.question-title .required {
    color: #ff0000;
    font-weight: bold;
    margin-left: 3px;
}

.question-subtitle {
    font-size: 14px;
    color: #ffffff;
    margin: 0;
    font-style: italic;
    opacity: 0.9;
}

/* Question Body */
.question-body {
    margin-top: 12px;
}

/* Text Fields */
.cos-field {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.cos-textarea {
    padding: 12px;
    font-size: 16px;
    line-height: 1.5;
    border: none;
    border-radius: 12px;
    resize: vertical;
    transition: all 0.2s;
}

.cos-textarea:focus {
    outline: none;
}

.cos-textarea::placeholder {
    color: #999;
    font-style: italic;
}

/* Dropdown */
.cos-dropdown {
    padding: 12px 40px 12px 12px;
    font-size: 16px;
    line-height: 1.5;
    border: none;
    border-radius: 12px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6L8 10L12 6" stroke="%23333333" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.cos-dropdown:focus {
    outline: none;
}

/* Radio Options (Multiple Choice) */
.cos-radio-option {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

/* Checkbox Options (Multiple Select) */
.cos-checkbox-option {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.cos-checkbox-option input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    border: 2px solid #ffffff;
    border-radius: 4px;
    background: transparent;
    outline: none;
    transition: all 0.2s;
}

.cos-checkbox-option input[type="checkbox"]:checked {
    background: #ffffff;
    border-color: #ffffff;
}

.cos-checkbox-option label {
    font-size: 16px;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
}

.cos-checkbox-option:hover {
    opacity: 0.8;
}

.cos-radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: transparent;
    outline: none;
    transition: all 0.2s;
}

.cos-radio-option input[type="radio"]:checked {
    background: #ffffff;
    border-color: #ffffff;
}

.cos-radio-option label {
    font-size: 16px;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
}

.cos-radio-option:hover {
    opacity: 0.8;
}

/* Rating Scale */
.cos-rating-scale {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    justify-content: flex-start;
}

.cos-rating-option {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cos-rating-option input[type="radio"] {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
}

.cos-rating-option label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
}

.cos-rating-option input[type="radio"]:checked + label {
    background: #ffffff;
    color: #212121;
    border-color: #ffffff;
    transform: scale(1.1);
}

.cos-rating-option label:hover {
    background: #ffffff;
    color: #212121;
    border-color: #ffffff;
    transform: scale(1.05);
}

.rating-labels {
    display: none;
}

/* GDPR Checkbox */
.cos-gdpr-checkbox {
    display: flex;
    align-items: flex-start;
}

.cos-gdpr-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    border: 2px solid #ffffff;
    border-radius: 4px;
    background: transparent;
    outline: none;
    transition: all 0.2s;
}

.cos-gdpr-checkbox input[type="checkbox"]:checked {
    background: #ffffff;
    border-color: #ffffff;
}

.cos-gdpr-checkbox label {
    font-size: 14px;
    color: #ffffff;
    cursor: pointer;
    line-height: 1.5;
}

/* Form Controls */
.cos-form-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
}

.cos-submit-btn {
    padding: 14px 40px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid #ffffff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cos-submit-btn:hover {
    background: rgba(255, 255, 255, 0.45);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    border-color: #ffffff;
}

.cos-submit-btn:active {
    transform: translateY(0);
}

.cos-submit-btn:disabled {
    background: rgba(150, 150, 150, 0.3);
    cursor: not-allowed;
    transform: none;
    opacity: 0.5;
}

.cos-submit-message {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-top: 20px;
    display: block;
    text-align: center;
    min-height: 25px;
    padding: 10px 0;
}

.cos-submit-message.success {
    color: #ffffff;
}

.cos-submit-message.error {
    color: #ff6b6b;
}

.cos-submit-message.info {
    color: #ffffff;
}

/* Loading State */
.cos-review-form.loading .cos-submit-btn {
    background: rgba(150, 150, 150, 0.3);
    cursor: wait;
    opacity: 0.5;
}

.cos-review-form.loading .cos-field {
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 768px) {
    .cos-review-title {
        font-size: 24px;
    }

    .cos-review-description {
        font-size: 16px;
    }

    .question-title {
        font-size: 16px;
    }

    .cos-rating-scale {
        justify-content: space-between;
        gap: 5px;
    }

    .cos-rating-option label {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .cos-submit-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .cos-form-controls {
        flex-direction: column;
    }
}

/* Validation Styling */
.cos-field:invalid {
    border-color: #d63638;
}

.cos-field:valid {
    border-color: #00a32a;
}

/* Focus visible for accessibility */
.cos-field:focus-visible,
.cos-radio-option input[type="radio"]:focus-visible + label,
.cos-rating-option input[type="radio"]:focus-visible + label,
.cos-gdpr-checkbox input[type="checkbox"]:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

