/* ============================================================
   DDGD - Drik Dansk Gin Dag - Frontend Styles
   ============================================================ */
:root {
    --ddgd-red: #C8102E;
    --ddgd-red-dark: #A00D24;
    --ddgd-black: #1A1A1A;
    --ddgd-grey: #6B6B6B;
    --ddgd-grey-light: #E8E0D8;
    --ddgd-off-white: #FDF6F0;
    --ddgd-cream: #FAF0E6;
    --ddgd-white: #FFFFFF;
}

/* ============ VOTING GRID ============ */
.ddgd-voting-intro {
    font-size: 1rem; color: var(--ddgd-grey); margin-bottom: 24px;
}
.ddgd-vote-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px; margin-bottom: 32px;
}
.ddgd-vote-card {
    background: var(--ddgd-white); border: 2px solid var(--ddgd-grey-light);
    border-radius: 14px; padding: 24px 16px; text-align: center;
    cursor: pointer; transition: all 0.3s; position: relative;
}
.ddgd-vote-card:hover {
    border-color: var(--ddgd-red); transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(200,16,46,0.1);
}
.ddgd-vote-card.ddgd-selected {
    border-color: var(--ddgd-red); background: #FEF2F2;
    box-shadow: 0 4px 20px rgba(200,16,46,0.15);
}
.ddgd-vote-card.ddgd-selected::after {
    content: '✓'; position: absolute; top: 10px; right: 12px;
    background: var(--ddgd-red); color: white;
    width: 24px; height: 24px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
}
.ddgd-vote-card.ddgd-disabled {
    opacity: 0.4; pointer-events: none;
}
.ddgd-vc-num {
    display: block; font-family: 'Playfair Display', serif;
    font-size: 1.6rem; font-weight: 900; color: var(--ddgd-red);
    opacity: 0.15; line-height: 1;
}
.ddgd-vc-name {
    display: block; font-family: 'Playfair Display', serif;
    font-size: 0.95rem; font-weight: 700; margin-top: 4px; color: var(--ddgd-black);
}
.ddgd-vc-loc {
    display: block; font-size: 0.7rem; color: var(--ddgd-grey);
    margin-top: 2px; letter-spacing: 0.5px; text-transform: uppercase;
}

/* ---- Vote button ---- */
.ddgd-vote-action { text-align: center; margin-top: 8px; }
.ddgd-vote-btn {
    display: inline-block; padding: 16px 48px; background: var(--ddgd-red);
    color: var(--ddgd-white); border-radius: 50px; font-weight: 700;
    font-size: 1.05rem; border: none; cursor: pointer;
    font-family: 'DM Sans', sans-serif; transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(200,16,46,0.3);
}
.ddgd-vote-btn:hover { background: var(--ddgd-red-dark); transform: translateY(-2px); }
.ddgd-vote-btn:disabled {
    opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none;
}
.ddgd-vote-hint {
    font-size: 0.8rem; color: var(--ddgd-grey); margin-top: 10px;
}
.ddgd-vote-hint a { color: var(--ddgd-red); }

/* ---- Voted message ---- */
.ddgd-voted-msg {
    text-align: center; padding: 40px 20px;
    background: #F0FDF4; border-radius: 16px; border: 1px solid #BBF7D0;
    margin-bottom: 24px;
}
.ddgd-voted-icon {
    width: 60px; height: 60px; background: #22C55E; color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; margin: 0 auto 14px;
}
.ddgd-voted-msg h3 {
    font-family: 'Playfair Display', serif; font-size: 1.3rem; margin-bottom: 8px;
}
.ddgd-voted-msg p { color: var(--ddgd-grey); line-height: 1.6; margin: 4px 0; }

/* ============ MODAL ============ */
.ddgd-modal-overlay {
    position: fixed; inset: 0; z-index: 99998;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(6px);
    display: none; align-items: center; justify-content: center;
}
.ddgd-modal-overlay.ddgd-active {
    display: flex;
}
.ddgd-modal {
    background: var(--ddgd-white); border-radius: 20px;
    padding: 44px 36px; max-width: 520px; width: 92%;
    box-shadow: 0 40px 80px rgba(0,0,0,0.25); position: relative;
}
.ddgd-modal-close {
    position: absolute; top: 14px; right: 18px;
    background: none; border: none; font-size: 1.5rem; color: var(--ddgd-grey);
    cursor: pointer; width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.ddgd-modal-close:hover { background: var(--ddgd-cream); color: var(--ddgd-black); }
.ddgd-modal h3 {
    font-family: 'Playfair Display', serif; font-size: 1.5rem; margin-bottom: 4px;
}
.ddgd-modal-selected {
    color: var(--ddgd-red); font-size: 1rem; margin-bottom: 20px;
}
.ddgd-field { margin-bottom: 16px; }
.ddgd-field label {
    display: block; font-weight: 600; font-size: 0.82rem; margin-bottom: 5px;
}
.ddgd-field input {
    width: 100%; padding: 12px 14px; border: 2px solid var(--ddgd-grey-light);
    border-radius: 10px; font-size: 1rem; font-family: inherit;
    background: var(--ddgd-off-white); transition: border-color 0.2s;
}
.ddgd-field input:focus {
    outline: none; border-color: var(--ddgd-red); background: var(--ddgd-white);
}
.ddgd-check {
    display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px;
}
.ddgd-check input[type="checkbox"] {
    margin-top: 3px; accent-color: var(--ddgd-red); width: 18px; height: 18px; flex-shrink: 0;
}
.ddgd-check label {
    font-size: 0.82rem; color: var(--ddgd-grey); line-height: 1.5; cursor: pointer;
}
.ddgd-check label a { color: var(--ddgd-red); }
.ddgd-submit-btn {
    width: 100%; padding: 14px; background: var(--ddgd-red); color: var(--ddgd-white);
    border: none; border-radius: 50px; font-family: inherit;
    font-weight: 700; font-size: 1rem; cursor: pointer;
    transition: background 0.3s; margin-top: 12px;
}
.ddgd-submit-btn:hover { background: var(--ddgd-red-dark); }
.ddgd-submit-btn:disabled { opacity: 0.5; cursor: wait; }
.ddgd-error {
    margin-top: 12px; padding: 10px 14px; background: #FEF2F2;
    border: 1px solid #FECACA; border-radius: 8px;
    color: #991B1B; font-size: 0.85rem;
}

/* ---- Thank you ---- */
.ddgd-modal-thanks { text-align: center; padding: 16px 0; }
.ddgd-thanks-icon {
    width: 64px; height: 64px; background: #22C55E; color: white;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; margin: 0 auto 16px;
}
.ddgd-modal-thanks h3 {
    font-family: 'Playfair Display', serif; font-size: 1.6rem; margin-bottom: 10px;
}
.ddgd-modal-thanks p { color: var(--ddgd-grey); line-height: 1.6; margin-bottom: 6px; }
.ddgd-share-btn {
    display: inline-block; margin-top: 16px; padding: 12px 32px;
    background: var(--ddgd-black); color: var(--ddgd-white);
    border-radius: 50px; font-weight: 700; border: none;
    cursor: pointer; font-family: inherit; font-size: 0.95rem;
}
.ddgd-share-btn:hover { opacity: 0.9; }

/* ============ LEADERBOARD ============ */
.ddgd-lb-wrap {
    background: var(--ddgd-white); border-radius: 20px;
    border: 1px solid var(--ddgd-grey-light); overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.04);
}
.ddgd-lb-header {
    display: grid; grid-template-columns: 48px 1fr 80px;
    gap: 12px; padding: 14px 24px;
    background: var(--ddgd-black); color: rgba(255,255,255,0.6);
    font-size: 0.7rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
}
.ddgd-lb-header span:last-child { text-align: right; }
.ddgd-lb-row {
    display: grid; grid-template-columns: 48px 1fr 80px;
    gap: 12px; padding: 14px 24px; align-items: center;
    border-bottom: 1px solid var(--ddgd-grey-light); transition: background 0.3s;
}
.ddgd-lb-row:last-child { border-bottom: none; }
.ddgd-lb-row:hover { background: var(--ddgd-off-white); }
.ddgd-lb-row.ddgd-highlight { background: #FEF2F2; }
.ddgd-lb-rank {
    font-family: 'Playfair Display', serif; font-weight: 900;
    font-size: 1.2rem; color: var(--ddgd-red); text-align: center;
}
.ddgd-lb-rank.ddgd-gold { color: #D4A017; }
.ddgd-lb-rank.ddgd-silver { color: #8C8C8C; }
.ddgd-lb-rank.ddgd-bronze { color: #B87333; }
.ddgd-lb-name {
    font-family: 'Playfair Display', serif; font-weight: 700;
    font-size: 0.95rem; margin-bottom: 5px;
}
.ddgd-lb-bar {
    height: 7px; background: var(--ddgd-grey-light); border-radius: 4px; overflow: hidden;
}
.ddgd-lb-bar-fill {
    height: 100%; background: var(--ddgd-red); border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
    min-width: 2px;
}
.ddgd-lb-votes {
    font-weight: 700; font-size: 1.05rem; text-align: right; color: var(--ddgd-black);
}
.ddgd-lb-votes small {
    display: block; font-weight: 400; font-size: 0.65rem;
    color: var(--ddgd-grey); text-transform: uppercase; letter-spacing: 0.5px;
}
.ddgd-lb-total {
    text-align: center; padding: 16px; background: var(--ddgd-off-white);
    border-top: 1px solid var(--ddgd-grey-light);
    font-size: 0.88rem; color: var(--ddgd-grey);
}
.ddgd-lb-total strong { color: var(--ddgd-black); font-size: 1.2rem; }
.ddgd-lb-loading {
    text-align: center; padding: 32px; color: var(--ddgd-grey);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .ddgd-vote-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .ddgd-vote-card { padding: 16px 10px; }
    .ddgd-lb-row, .ddgd-lb-header { padding: 12px 16px; }
    .ddgd-modal { padding: 32px 22px; }
}
@media (max-width: 480px) {
    .ddgd-vote-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
}
