/* Main content styling to match account page */
.reviews-content {
    margin: 0 auto;
    padding: 3rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* Page header matching account.astro style */
.page-header {
    margin-bottom: 3rem;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.back-button {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    box-shadow: none;
    text-decoration: none;
}

.back-button:hover {
    color: #0f172a;
    transform: translateY(-1px);
    background: none;
    box-shadow: none;
}

.back-button-container {
    display: flex;
    align-items: flex-start;
    max-width: 800px;
    width: 100%;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Reviews list styling */
.reviews-list {
    display: flex;
    align-items: center;
    justify-self: center;
    width: 100%;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.no-reviews {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Review card styling matching carousel cards */
.review-card {
    background: var(--white, #fff);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 800px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.review-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #7fb2f8 0%, #0a4194 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.review-card:hover {
    box-shadow: 0 12px 32px rgba(10, 65, 148, 0.12);
    transform: translateY(-4px);
    border-color: rgba(10, 65, 148, 0.2);
}

.review-card:hover::before {
    transform: scaleX(1);
}

/* Quote icon decoration */
.review-card::after {
    content: '"';
    position: absolute;
    bottom: 0.5rem;
    right: 1rem;
    font-size: 4rem;
    font-family: Georgia, serif;
    color: rgba(10, 65, 148, 0.06);
    line-height: 1;
    pointer-events: none;
}

/* Review header layout */
.review-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.review-header-top {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
}

.review-name-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.review-verified-inline {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.review-name {
    font-weight: 600;
    color: var(--primary, #1a1a2e);
    font-size: 1.05rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.review-location {
    font-size: 0.85rem;
    color: #94a3b8;
    font-style: normal;
    text-align: left;
}

.review-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.review-date {
    color: #94a3b8;
    font-size: 0.8rem;
}

.review-verified {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #0a4194;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.review-text {
    font-size: 0.95rem;
    color: var(--text-light, #64748b);
    line-height: 1.7;
    text-align: left;
}

/* Leave review section styling */
.leave-review {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 800px;
    box-sizing: border-box;
}

.leave-review h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary, #1a1a2e);
    margin: 0 0 1.5rem 0;
}

/* Form styling */
.review-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0a4194;
    box-shadow: 0 0 0 3px rgba(10, 65, 148, 0.1);
}

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

/* Button styling */
.btn {
    padding: 0.875rem 1.75rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
}

.btn-primary {
    background: linear-gradient(135deg, #7fb2f8 0%, #0a4194 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(10, 65, 148, 0.3);
    width: 240px;
    align-self: center;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(10, 65, 148, 0.4);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Button Loading States */
.btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Submit Loading Overlay (matches clasificar spinner) */
.review-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}

.review-loading-overlay .loading-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    text-align: center;
    padding: 2rem;
}

.review-loading-overlay .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light, #e2e8f0);
    border-top-color: var(--accent-primary, #0a4194);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.review-loading-overlay .loading-text {
    color: var(--text-secondary, #64748b);
    font-size: 0.9375rem;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Pagination Styles */
.pagination-container {
    margin: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.pagination-info {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background: #0a4194;
    color: white;
    border-color: #0a4194;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.pagination-page {
    min-width: 40px;
    height: 40px;
    padding: 1rem;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-page:hover {
    background: #f5f5f5;
    border-color: #0a4194;
}

.pagination-page.active {
    background: linear-gradient(135deg, #7fb2f8 0%, #0a4194 100%);
    color: white;
    border-color: #0a4194;
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: #999;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
    .reviews-content {
        padding: 2rem 1rem;
        width: 100%;
    }

    .page-title {
        font-size: 2rem;
    }

    .leave-review {
        padding: 1.5rem;
        width: 100%;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .pagination-controls {
        flex-direction: column;
        width: 100%;
    }

    .pagination-btn {
        width: 100%;
        justify-content: center;
    }

    .pagination-pages {
        order: -1;
    }
}

@media (max-width: 480px) {
    .reviews-content {
        padding: 1.5rem 1rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .review-card {
        padding: 1.25rem;
    }

    .leave-review {
        padding: 1.25rem;
    }
}