/**
 * Bedsie Review Form Styles
 */

/* Container */
.bedsie-review-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Review Header */
.bedsie-review-container .review-header {
    text-align: center;
    margin-bottom: 40px;
}

.bedsie-review-container .review-header h1 {
    font-size: 32px;
    color: #1a1a1a;
    margin: 0 0 10px 0;
}

.bedsie-review-container .review-header p {
    color: #6b7280;
    font-size: 16px;
    margin: 0;
}

/* Customer Info Banner */
.customer-info-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-radius: 10px;
    margin-bottom: 30px;
    border: 1px solid #a7f3d0;
}

.customer-info-banner .icon {
    width: 24px;
    height: 24px;
    color: #059669;
    flex-shrink: 0;
}

.customer-info-banner span {
    color: #065f46;
}

.customer-info-banner strong {
    color: #047857;
}

/* Product Review Card */
.product-review-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-review-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-review-card.has-error {
    border-color: #f87171;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

/* Product Header */
.product-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.product-header .product-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.product-info {
    flex: 1;
}

.product-info .product-name {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.product-info .product-link {
    font-size: 14px;
    color: #6366f1;
    text-decoration: none;
    transition: color 0.15s ease;
}

.product-info .product-link:hover {
    color: #4f46e5;
}

/* Rating Section */
.rating-section {
    margin-bottom: 20px;
}

.rating-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 12px;
}

.rating-label .required {
    color: #ef4444;
}

/* Star Rating */
.star-rating {
    display: flex;
    gap: 8px;
}

.star-rating .star {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 40px;
    height: 40px;
    color: #d1d5db;
    transition: color 0.15s ease, transform 0.15s ease;
}

.star-rating .star svg {
    width: 100%;
    height: 100%;
}

.star-rating .star:hover {
    transform: scale(1.15);
}

.star-rating .star.active,
.star-rating .star.hover {
    color: #fbbf24;
}

.rating-text {
    margin-top: 8px;
    font-size: 14px;
    color: #6b7280;
    min-height: 21px;
}

.rating-text.error {
    color: #ef4444;
}

/* Review Section */
.review-section {
    margin-top: 20px;
}

.review-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

.review-label .optional {
    font-weight: 400;
    color: #9ca3af;
}

.review-section textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.review-section textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.review-section textarea::placeholder {
    color: #9ca3af;
}

/* Submit Section */
.submit-section {
    margin-top: 30px;
    text-align: center;
}

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    color: #fff;
    border: none;
    padding: 16px 48px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    min-width: 200px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn .spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.submit-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 14px;
    color: #6b7280;
}

.submit-note svg {
    width: 18px;
    height: 18px;
}

/* Messages */
.error-message,
.success-message {
    text-align: center;
    padding: 60px 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.error-message svg {
    width: 64px;
    height: 64px;
    color: #ef4444;
    margin-bottom: 20px;
}

.error-message p {
    font-size: 18px;
    color: #6b7280;
    margin: 0 0 24px 0;
}

.success-message .success-icon svg {
    width: 80px;
    height: 80px;
    color: #10b981;
}

.success-message h2 {
    font-size: 28px;
    color: #111827;
    margin: 20px 0 10px 0;
}

.success-message p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 30px 0;
}

.back-home-btn {
    display: inline-block;
    padding: 14px 32px;
    background: #111827;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.15s ease;
}

.back-home-btn:hover {
    background: #1f2937;
    color: #fff;
}

/* Form Error */
.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
}

.form-error.visible {
    display: block;
}

/* Responsive */
@media (max-width: 640px) {
    .bedsie-review-container {
        padding: 0 15px;
        margin: 20px auto;
    }

    .bedsie-review-container .review-header h1 {
        font-size: 24px;
    }

    .product-header {
        flex-direction: column;
        text-align: center;
    }

    .product-header .product-image {
        width: 100px;
        height: 100px;
    }

    .star-rating .star {
        width: 36px;
        height: 36px;
    }

    .submit-btn {
        width: 100%;
        padding: 16px 20px;
    }
}
