/* ═══════════════════════════════════════════════════════
   City Rocks Manager – Frontend v5
   Pixel-matched to THE CITY ROCKS card design
   Card BG: #131925  Page BG: #212936  Green: #4DA37C
   ═══════════════════════════════════════════════════════ */

/* ─── Grid ────────────────────────────────────────────── */
.crm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

/* ─── Cards ───────────────────────────────────────────── */
.crm-card {
    background: #131925 !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    color: #E5E7EB !important;
}

.crm-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.crm-card-image {
    overflow: hidden;
    margin: 12px 12px 0 12px;
    border-radius: 12px;
}

.crm-card-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    transition: transform 0.4s ease;
}

.crm-card:hover .crm-card-image img {
    transform: scale(1.04);
}

.crm-card-content {
    padding: 18px 20px 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Title - near white */
.crm-card-title {
    margin: 0 0 4px 0;
    font-size: 1.2em;
    font-weight: 700;
    line-height: 1.3;
    color: #F8FAFB !important;
}

.crm-card-title a {
    text-decoration: none !important;
    color: #F8FAFB !important;
    transition: color 0.2s;
}

.crm-card-title a:hover { color: #4DA37C !important; }

/* Genre / Tagline - green accent */
.crm-card-genre,
.crm-card-tagline {
    margin: 0 0 12px 0;
    color: #4DA37C !important;
    font-size: 0.92em;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.3px;
}

/* Description text - muted grey */
.crm-card-desc {
    margin: 0 0 8px;
    font-size: 0.9em;
    color: #7E8188 !important;
    line-height: 1.65;
}

/* Meta info - grey */
.crm-card-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88em;
    color: #7F8389 !important;
    margin-top: auto;
    padding-top: 10px;
}

.crm-card-meta span,
.crm-meta-item {
    color: #7F8389 !important;
}

.crm-meta-item a {
    color: #4DA37C !important;
    text-decoration: none !important;
    transition: color 0.2s;
}

.crm-meta-item a:hover { color: #6CC9A0 !important; }

/* ═══════════════════════════════════════════════════════
   CAROUSEL
   ═══════════════════════════════════════════════════════ */
.crm-carousel-wrapper {
    position: relative;
    margin: 24px 0;
    padding: 0 52px;
    outline: none;
    -webkit-user-select: none;
    user-select: none;
}

.crm-carousel-viewport {
    overflow: hidden;
}

.crm-carousel-track {
    display: flex;
    gap: 24px;
    will-change: transform;
}

.crm-carousel-slide {
    flex-shrink: 0;
}

.crm-carousel-slide .crm-card {
    height: 100%;
}

/* Arrows */
.crm-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-60%);
    z-index: 10;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 50% !important;
    background: rgba(19, 25, 37, 0.9) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: #E5E7EB !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    padding: 0;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.crm-carousel-arrow:hover {
    background: #4DA37C !important;
    border-color: #4DA37C !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 20px rgba(77, 163, 124, 0.4);
}

.crm-carousel-arrow.crm-arrow-disabled {
    opacity: 0.2 !important;
    cursor: default;
    pointer-events: none;
}

.crm-arrow-left { left: 0; }
.crm-arrow-right { right: 0; }

/* Dots */
.crm-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.crm-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none !important;
    background: rgba(255, 255, 255, 0.15) !important;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
}

.crm-carousel-dot.crm-dot-active {
    background: #4DA37C !important;
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(77, 163, 124, 0.4);
}

.crm-carousel-dot:hover:not(.crm-dot-active) {
    background: rgba(255, 255, 255, 0.35) !important;
}

/* ═══════════════════════════════════════════════════════
   POPUP BUTTON – green, matching site buttons
   ═══════════════════════════════════════════════════════ */
.crm-popup-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 10px 28px;
    background: #4DA37C !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 10px rgba(77, 163, 124, 0.3);
    text-decoration: none !important;
}

.crm-popup-btn:hover {
    background: #3D8A68 !important;
    box-shadow: 0 4px 20px rgba(77, 163, 124, 0.5);
    transform: translateY(-2px);
    color: #FFFFFF !important;
}

/* ═══════════════════════════════════════════════════════
   POPUP OVERLAY – fullscreen, dark theme
   ═══════════════════════════════════════════════════════ */
body.crm-popup-open {
    overflow: hidden !important;
}

.crm-popup-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0) !important;
    z-index: 999999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: background 0.3s ease, backdrop-filter 0.3s ease, -webkit-backdrop-filter 0.3s ease;
}

.crm-popup-overlay.crm-popup-active {
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.crm-popup-overlay.crm-popup-closing {
    background: rgba(0, 0, 0, 0) !important;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

/* Popup box – matches card style */
.crm-popup-content {
    background: #131925 !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 36px 32px 32px;
    max-width: 580px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.9) translateY(30px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    color: #E5E7EB;
}

.crm-popup-active .crm-popup-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.crm-popup-closing .crm-popup-content {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.crm-popup-content::-webkit-scrollbar { width: 6px; }
.crm-popup-content::-webkit-scrollbar-track { background: transparent; }
.crm-popup-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 3px; }

.crm-popup-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #7F8389;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    padding: 0;
}

.crm-popup-close:hover {
    background: #E74C3C !important;
    border-color: #E74C3C !important;
    color: #FFFFFF !important;
    transform: rotate(90deg);
}

.crm-popup-content h3 {
    margin: 0 0 18px 0;
    font-size: 1.4em;
    padding-right: 44px;
    line-height: 1.3;
    color: #F8FAFB !important;
}

.crm-popup-content p {
    line-height: 1.75;
    color: #7E8188 !important;
    font-size: 0.95em;
    margin-bottom: 12px;
}

.crm-popup-content p:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════
   INFO TEXT inline
   ═══════════════════════════════════════════════════════ */
.crm-info-text {
    margin-top: 14px;
    padding: 14px 16px;
    background: rgba(77, 163, 124, 0.06);
    border-left: 3px solid #4DA37C;
    border-radius: 0 8px 8px 0;
    font-size: 0.9em;
    line-height: 1.65;
    color: #7E8188 !important;
}

.crm-info-text p:last-child { margin-bottom: 0; }

/* ═══════════════════════════════════════════════════════
   CONCERT DETAILS
   ═══════════════════════════════════════════════════════ */
.crm-konzert-details { max-width: 700px; margin: 24px 0; color: #E5E7EB; }
.crm-event-badge { display: inline-block; padding: 6px 16px; background: #4DA37C; color: #fff; border-radius: 8px; font-weight: 700; font-size: 0.9em; margin-bottom: 16px; }
.crm-detail-meta { margin-bottom: 20px; }
.crm-detail-item { margin-bottom: 5px; font-size: 1em; color: #E5E7EB; }

.crm-linked-card { display: flex; align-items: center; gap: 16px; padding: 16px; margin-bottom: 12px; background: rgba(255,255,255,0.03); border-radius: 12px; border: 1px solid rgba(255,255,255,0.08); transition: border-color 0.2s; }
.crm-linked-card:hover { border-color: #4DA37C; }
.crm-linked-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.crm-linked-info { display: flex; flex-direction: column; gap: 3px; }
.crm-linked-label { font-size: 0.8em; color: #4DA37C !important; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.crm-linked-name { font-size: 1.1em; font-weight: 700; text-decoration: none; color: #F8FAFB !important; }
.crm-linked-name:hover { color: #4DA37C !important; }
.crm-linked-extra { font-size: 0.9em; color: #7F8389; font-style: italic; }
.crm-linked-address { font-size: 0.85em; color: #7F8389; }
.crm-maps-link { font-size: 0.85em; color: #4DA37C; text-decoration: none; }
.crm-maps-link:hover { text-decoration: underline; }
.crm-detail-desc { margin-top: 20px; line-height: 1.75; color: #7E8188; }
.crm-special-offer { margin-top: 16px; padding: 14px 18px; background: rgba(77,163,124,0.08); border: 1px solid rgba(77,163,124,0.15); border-radius: 10px; font-weight: 600; color: #E5E7EB; }

.crm-related-concerts { margin: 24px 0; color: #E5E7EB; }
.crm-related-concerts h4 { margin-bottom: 12px; color: #F8FAFB; }
.crm-related-concerts ul { list-style: none; padding: 0; margin: 0; }
.crm-related-concerts li { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); color: #7E8188; }
.crm-related-concerts li:last-child { border-bottom: none; }
.crm-related-concerts a { text-decoration: none; color: #E5E7EB; }
.crm-related-concerts a:hover { color: #4DA37C; }
.crm-no-results { color: #7F8389; font-style: italic; padding: 20px 0; }

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 860px) {
    .crm-carousel-wrapper { padding: 0 46px; }
    .crm-carousel-arrow { width: 40px; height: 40px; }
}

@media (max-width: 600px) {
    .crm-grid { grid-template-columns: 1fr; gap: 16px; }
    .crm-carousel-wrapper { padding: 0 38px; }
    .crm-carousel-arrow { width: 36px; height: 36px; }
    .crm-carousel-arrow svg { width: 18px; height: 18px; }
    .crm-card-image { margin: 10px 10px 0 10px; border-radius: 10px; }
    .crm-card-image img { height: 190px; border-radius: 10px; }
    .crm-card-content { padding: 14px 16px 18px; }
    .crm-popup-overlay { padding: 12px; }
    .crm-popup-content { padding: 28px 20px 24px; max-height: 88vh; border-radius: 16px; }
    .crm-popup-content h3 { font-size: 1.2em; }
    .crm-linked-card { flex-direction: column; text-align: center; }
}

@media (max-width: 380px) {
    .crm-carousel-wrapper { padding: 0 32px; }
    .crm-carousel-arrow { width: 30px; height: 30px; }
    .crm-carousel-arrow svg { width: 16px; height: 16px; }
}
