/**
 * Placename Decoder Activity Styles
 * Interactive map of Ireland with clickable placenames
 */

/* Main Content Layout */
.main-content {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    padding: 1rem;
    min-height: calc(100vh - 120px);
}

/* Map Section */
.map-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 1;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.map-container svg {
    width: 100%;
    height: 100%;
    pointer-events: all;
}

.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2rem;
    color: var(--text-muted);
}

.map-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-red);
    font-size: 1rem;
}

/* SVG County Styles */
.map-container .county {
    fill: #c8e6c9;
    stroke: #81c784;
    stroke-width: 2;
    transition: fill 0.2s ease;
    cursor: pointer;
}

.map-container .county:hover {
    fill: #a5d6a7;
}

.map-container .county.highlighted {
    fill: #81c784;
    stroke: #4caf50;
    stroke-width: 3;
}

/* Placename Markers */
#placename-markers {
    pointer-events: all;
}

.placename-marker {
    cursor: pointer;
    pointer-events: all;
}

.placename-marker:hover .marker-circle {
    r: 22;
}

.placename-marker .marker-circle {
    fill: var(--primary-orange);
    stroke: #fff;
    stroke-width: 4;
    transition: all 0.2s ease;
}

.placename-marker:hover .marker-circle {
    fill: var(--primary-red);
}

.placename-marker.active .marker-circle {
    fill: var(--primary-blue);
    r: 22;
}

.placename-marker.learned .marker-circle {
    fill: var(--primary-green);
}

.placename-marker .marker-label {
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    font-weight: 600;
    fill: var(--text-dark);
    pointer-events: none;
}

.placename-marker.learned .marker-label {
    fill: var(--primary-green);
}

/* Pulse animation for learned markers */
@keyframes marker-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.placename-marker.pulse {
    animation: marker-pulse 0.5s ease;
}

/* Info Section */
.info-section {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Info Panel */
.info-panel {
    background: var(--bg-section);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
    min-height: 300px;
}

.info-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 250px;
    color: var(--text-muted);
    text-align: center;
    padding: 2rem;
}

.info-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.info-placeholder p {
    font-size: 0.95rem;
    margin: 0;
}

.info-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.english-name {
    font-family: 'Baloo 2', cursive;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.btn-close-info {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.btn-close-info:hover {
    color: var(--text-dark);
}

/* Irish Name Section */
.irish-name-section {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: var(--radius-medium);
    padding: 1rem;
    margin-bottom: 1rem;
}

.irish-name-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.irish-name {
    font-family: 'Baloo 2', cursive;
    font-size: 1.3rem;
    font-weight: 700;
    color: #2e7d32;
}

.btn-audio {
    background: #fff;
    border: 2px solid #81c784;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #4caf50;
    transition: all 0.2s ease;
}

.btn-audio:hover {
    background: #4caf50;
    color: #fff;
}

.phonetic {
    font-style: italic;
    color: #558b2f;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Historical Section */
.historical-section {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-radius: var(--radius-medium);
    padding: 1rem;
    margin-bottom: 1rem;
}

.historical-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.historical-name {
    font-family: 'Baloo 2', cursive;
    font-size: 1.2rem;
    font-weight: 700;
    color: #e65100;
}

.historical-section .btn-audio {
    border-color: #ffb74d;
    color: #f57c00;
}

.historical-section .btn-audio:hover {
    background: #f57c00;
    color: #fff;
}

.historical-section .phonetic {
    color: #bf360c;
}

/* Meaning Section */
.meaning-section {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.meaning {
    font-family: 'Baloo 2', cursive;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-purple);
}

/* Etymology Section */
.etymology-section {
    background: #f5f5f5;
    border-radius: var(--radius-small);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.etymology {
    font-size: 0.9rem;
    color: var(--text-dark);
    line-height: 1.5;
    margin: 0;
}

/* Image Section */
.image-section {
    margin-bottom: 1rem;
}

.place-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius-medium);
}

/* Mark Learned Button */
.btn-mark-learned {
    width: 100%;
    padding: 0.75rem 1.5rem;
}

.btn-mark-learned:disabled {
    background: linear-gradient(135deg, #a5d6a7 0%, #81c784 100%);
    cursor: default;
}

/* Legend Panel */
.legend-panel {
    background: var(--bg-section);
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
}

.legend-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.legend-items {
    display: flex;
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.marker-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.marker-dot.unvisited {
    background: var(--primary-orange);
}

.marker-dot.learned {
    background: var(--primary-green);
}

/* Completion Stats */
.completion-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.stat-badge {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-round);
    font-weight: 600;
    color: #2e7d32;
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }

    .info-section {
        width: 100%;
    }

    .map-container {
        max-width: 100%;
        max-height: 50vh;
    }
}

@media (max-width: 576px) {
    .info-panel {
        padding: 1rem;
    }

    .english-name {
        font-size: 1.4rem;
    }

    .irish-name {
        font-size: 1.1rem;
    }

    .legend-items {
        flex-direction: column;
        gap: 0.5rem;
    }

    .placename-marker .marker-label {
        font-size: 16px;
    }
}

/* ===== Start Overlay ===== */
.start-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(250, 251, 252, 0.98) 0%, rgba(245, 247, 250, 0.98) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
    padding: 1rem;
}

.start-overlay.hidden {
    display: none;
}

.start-content {
    text-align: center;
    padding: 1.25rem 1.5rem;
    background: var(--bg-section);
    border-radius: var(--radius-large);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 340px;
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.start-icon {
    font-size: 2.5rem;
    color: var(--primary-orange);
    margin-bottom: 0.5rem;
}

.start-title {
    font-family: 'Baloo 2', cursive;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.start-text {
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.start-btn {
    font-size: 1rem;
    padding: 0.75rem 2rem;
}

/* Hidden utility class */
.hidden {
    display: none !important;
}
