/* ======================================
   Golf Course Review — Frontend Styles
   ====================================== */

/* === Variables === */
:root {
    --gcr-primary: #2d6a4f;
    --gcr-primary-dark: #1b4332;
    --gcr-accent: #f4c63d;
    --gcr-accent-hover: #e5b52e;
    --gcr-danger: #dc3545;
    --gcr-success: #28a745;
    --gcr-text: #333;
    --gcr-text-muted: #777;
    --gcr-bg: #fff;
    --gcr-bg-light: #f8f9fa;
    --gcr-border: #e0e0e0;
    --gcr-radius: 8px;
    --gcr-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* === Form Container === */
.gcr-form-container {
    max-width: 520px;
    margin: 0 auto;
    padding: 32px;
    background: var(--gcr-bg);
    border-radius: var(--gcr-radius);
    box-shadow: var(--gcr-shadow);
}

.gcr-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--gcr-text);
}

.gcr-form-subtitle {
    color: var(--gcr-text-muted);
    margin-bottom: 24px;
}

.gcr-form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

.gcr-form-group {
    flex: 1;
    margin-bottom: 16px;
}

.gcr-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 6px;
    color: var(--gcr-text);
}

.gcr-form-group .required {
    color: var(--gcr-danger);
}

.gcr-form-group input,
.gcr-form-group select,
.gcr-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gcr-border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.gcr-form-group input:focus,
.gcr-form-group select:focus,
.gcr-form-group textarea:focus {
    border-color: var(--gcr-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.gcr-form-footer {
    text-align: center;
    margin-top: 16px;
    color: var(--gcr-text-muted);
    font-size: 0.875rem;
}

.gcr-form-footer a {
    color: var(--gcr-primary);
    font-weight: 600;
}

/* === Buttons === */
.gcr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.gcr-btn-primary {
    background: var(--gcr-primary);
    color: #fff;
}

.gcr-btn-primary:hover {
    background: var(--gcr-primary-dark);
}

.gcr-btn-outline {
    background: transparent;
    color: var(--gcr-primary);
    border: 2px solid var(--gcr-primary);
}

.gcr-btn-outline:hover {
    background: var(--gcr-primary);
    color: #fff;
}

/* === Messages === */
.gcr-message {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

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

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

/* === Avatar Preview === */
.gcr-avatar-preview {
    margin-top: 8px;
}

.gcr-avatar-preview img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gcr-border);
}

/* === Auth Prompt === */
.gcr-auth-prompt {
    text-align: center;
    padding: 40px 20px;
    background: var(--gcr-bg-light);
    border-radius: var(--gcr-radius);
    border: 2px dashed var(--gcr-border);
}

.gcr-auth-prompt-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.gcr-auth-prompt h4 {
    margin-bottom: 8px;
    font-size: 1.25rem;
}

.gcr-auth-prompt p {
    color: var(--gcr-text-muted);
    margin-bottom: 20px;
}

.gcr-auth-prompt-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    max-width: 280px;
    margin: 0 auto;
}

.gcr-auth-prompt-buttons .gcr-btn {
    width: auto;
    padding: 10px 28px;
}

/* === Star Rating Selector === */
.gcr-ratings-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.gcr-rating-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--gcr-bg-light);
    border-radius: 6px;
}

.gcr-rating-label {
    flex: 1;
}

.gcr-rating-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
}

.gcr-rating-desc {
    display: block;
    font-size: 0.75rem;
    color: var(--gcr-text-muted);
}

.gcr-star-selector {
    display: flex;
    gap: 4px;
    cursor: pointer;
}

.gcr-star {
    font-size: 1.5rem;
    color: #ddd;
    transition: color 0.15s;
    user-select: none;
}

.gcr-star.active,
.gcr-star.hover {
    color: var(--gcr-accent);
}

/* === Photo Upload === */
.gcr-photo-upload-area {
    border: 2px dashed var(--gcr-border);
    border-radius: var(--gcr-radius);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.gcr-photo-upload-area:hover,
.gcr-photo-upload-area.dragover {
    border-color: var(--gcr-primary);
    background: rgba(45, 106, 79, 0.03);
}

.gcr-photo-upload-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.gcr-upload-link {
    color: var(--gcr-primary);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
}

.gcr-photo-previews {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.gcr-photo-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
}

.gcr-photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.gcr-photo-preview-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: var(--gcr-danger);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* === Warning Box === */
.gcr-warning {
    padding: 14px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #856404;
    margin: 20px 0;
}

/* === Review Summary === */
.gcr-review-summary {
    display: flex;
    gap: 32px;
    padding: 24px;
    background: var(--gcr-bg);
    border-radius: var(--gcr-radius);
    box-shadow: var(--gcr-shadow);
    margin-bottom: 32px;
}

.gcr-score-circle {
    flex-shrink: 0;
    width: 140px;
    text-align: center;
    padding: 20px 0;
}

.gcr-score-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--gcr-primary);
    line-height: 1;
}

.gcr-score-label {
    font-size: 0.8rem;
    color: var(--gcr-text-muted);
    margin: 4px 0 8px;
}

.gcr-score-rank {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.gcr-rank-a { background: #d4edda; color: #155724; }
.gcr-rank-bplus { background: #cce5ff; color: #004085; }
.gcr-rank-b { background: #fff3cd; color: #856404; }
.gcr-rank-c { background: #f8d7da; color: #721c24; }

.gcr-score-count {
    font-size: 0.8rem;
    color: var(--gcr-text-muted);
}

.gcr-category-bars {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
}

.gcr-category-bar {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gcr-category-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
}

.gcr-category-name {
    font-weight: 600;
    color: var(--gcr-text);
}

.gcr-category-percent {
    font-weight: 700;
    color: var(--gcr-primary);
}

.gcr-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.gcr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gcr-primary), var(--gcr-accent));
    border-radius: 4px;
    transition: width 0.6s ease;
}

/* === Review Cards === */
.gcr-review-card {
    padding: 24px;
    background: var(--gcr-bg);
    border-radius: var(--gcr-radius);
    box-shadow: var(--gcr-shadow);
    margin-bottom: 16px;
}

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

.gcr-review-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gcr-review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.gcr-review-user-name {
    display: block;
    font-size: 1rem;
}

.gcr-review-nationality {
    display: block;
    font-size: 0.8rem;
    color: var(--gcr-text-muted);
}

.gcr-review-date {
    font-size: 0.8rem;
    color: var(--gcr-text-muted);
}

.gcr-review-ratings-compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--gcr-bg-light);
    border-radius: 6px;
}

.gcr-review-rating-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.gcr-review-rating-label {
    font-size: 0.7rem;
    color: var(--gcr-text-muted);
    font-weight: 600;
}

.gcr-review-rating-stars {
    color: var(--gcr-accent);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.gcr-review-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--gcr-text);
    margin-bottom: 12px;
}

.gcr-review-photos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gcr-review-photo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.2s;
}

.gcr-review-photo:hover {
    transform: scale(1.05);
}

/* === Section Titles === */
.gcr-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--gcr-text);
}

.gcr-subsection-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--gcr-text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.gcr-review-count-badge {
    background: var(--gcr-primary);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 12px;
}

/* === Pagination === */
.gcr-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.gcr-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: var(--gcr-bg-light);
    color: var(--gcr-text);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.gcr-page-link:hover,
.gcr-page-link.active {
    background: var(--gcr-primary);
    color: #fff;
}

/* === Modal === */
.gcr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gcr-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.gcr-modal-content {
    position: relative;
    background: var(--gcr-bg);
    border-radius: 12px;
    padding: 32px;
    max-width: 560px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

.gcr-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gcr-text-muted);
}

/* === Empty States === */
.gcr-summary-empty,
.gcr-reviews-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--gcr-text-muted);
    background: var(--gcr-bg-light);
    border-radius: var(--gcr-radius);
}

/* === Reviewer Info in form === */
.gcr-review-form-header {
    margin-bottom: 20px;
}

.gcr-reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gcr-reviewer-info img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.gcr-reviewer-nationality {
    display: block;
    font-size: 0.8rem;
    color: var(--gcr-text-muted);
}

.gcr-optional {
    font-weight: 400;
    font-size: 0.8rem;
    color: var(--gcr-text-muted);
}

/* === Responsive === */
@media (max-width: 768px) {
    .gcr-form-row {
        flex-direction: column;
        gap: 0;
    }

    .gcr-review-summary {
        flex-direction: column;
        align-items: center;
    }

    .gcr-score-circle {
        width: 100%;
    }

    .gcr-review-ratings-compact {
        grid-template-columns: repeat(2, 1fr);
    }

    .gcr-rating-category {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .gcr-auth-prompt-buttons {
        flex-direction: column;
    }

    .gcr-review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}
