/* static/css/store_detail.css - Store Detail Page Specific Styles */

/* Header Style Override */
header {
    margin-bottom: 0 !important;
}
main.container {
    padding-top: 15px !important;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area a {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-area span {
    color: #fbbf24;
}

/* Breadcrumb Style */
.breadcrumb-wrapper {
    margin-bottom: 25px;
}

.breadcrumb {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb span {
    color: #fbbf24;
    font-weight: 500;
}

/* Banner Style */
.visual-banner-wrapper {
    margin-bottom: 40px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    background: var(--bg-secondary);
}

.visual-banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Main Content Box */
.content-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
}

h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #fff;
    letter-spacing: -0.5px;
}

.intro-text {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.8;
}

.intro-text b {
    color: #fbbf24;
    font-weight: 600;
}

/* Info Grid */
.info-grid-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.info-item-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.info-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 500;
}

.info-value {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}

.info-value.yellow {
    color: #fbbf24;
}

/* Map Link Box */
.map-btn-box {
    text-align: center;
    margin-bottom: 35px;
}

.map-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #3b82f6;
    color: #fff;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.map-link-btn:hover {
    transform: translateY(-2px);
    background-color: #2563eb;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Tip Section */
.tips-section {
    background: rgba(251, 191, 36, 0.02);
    border: 1px dashed rgba(251, 191, 36, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 30px;
}

.tips-title {
    font-size: 16px;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tips-text {
    color: var(--text-secondary);
    font-size: 14.5px;
    line-height: 1.7;
}

/* Back Link Box */
.back-link-box {
    text-align: center;
    margin-top: 50px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fbbf24;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #f59e0b;
    text-decoration: underline;
}

/* Footer Style */
footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
    margin: 0 10px;
}

footer a:hover {
    color: #fff;
}

/* Small Lotto Balls for Stats */
.lotto-ball-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-weight: 800;
    color: #fff;
    font-size: 13.5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Dong Badges Style */
.dong-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11.5px;
    font-weight: 600;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}
.dong-badge.bopjeong {
    background-color: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.dong-badge.haengjeong {
    background-color: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Ad Placement Style */
.ad-container {
    margin: 30px auto;
    padding: 12px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    text-align: center;
    max-width: 100%;
}
.ad-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: block;
}
.ad-placeholder {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.015);
    color: var(--text-secondary);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
}

/* Responsive Winning History List (Desktop View) */
.history-desktop-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 6px;
}

.history-desktop-table::-webkit-scrollbar {
    width: 6px;
}
.history-desktop-table::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 3px;
}
.history-desktop-table::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}
.history-desktop-table::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.winning-history-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}
.winning-history-item:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: #cbd5e1;
    transform: translateY(-2px);
}
.history-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 100px;
    flex-shrink: 0;
}
.history-left .round-badge {
    font-size: 16px;
    font-weight: 800;
    color: #1f2937;
}
.history-left .draw-date {
    font-size: 13px;
    color: #718096;
    font-weight: 500;
}
.history-left .buy-type-badge {
    align-self: flex-start;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 2px;
}
.buy-type-badge.type-auto {
    background-color: rgba(251, 191, 36, 0.15);
    color: #d97706;
    border: 1px solid rgba(251, 191, 36, 0.3);
}
.buy-type-badge.type-manual {
    background-color: rgba(59, 130, 246, 0.15);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.buy-type-badge.type-semi {
    background-color: rgba(16, 185, 129, 0.15);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.buy-type-badge.type-unknown {
    background-color: rgba(156, 163, 175, 0.15);
    color: #4b5563;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

/* Flatten lotto balls for desktop view inside white card */
.winning-history-item .lotto-ball-small {
    width: 34px !important;
    height: 34px !important;
    font-size: 13.5px !important;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #ffffff;
    text-shadow: none !important;
    box-shadow: none !important;
    flex-shrink: 0;
}
.winning-history-item .ball-yellow { background: #f5a623 !important; }
.winning-history-item .ball-blue { background: #007bc4 !important; }
.winning-history-item .ball-red { background: #de3e35 !important; }
.winning-history-item .ball-grey { background: #8e8e93 !important; }
.winning-history-item .ball-green { background: #34a853 !important; }

.history-balls {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}
.winning-history-item .bonus-plus {
    color: #718096;
    font-size: 16px;
    font-weight: 700;
    margin: 0 4px;
}
.history-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 160px;
    flex-shrink: 0;
}
.payout-box {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.history-right .payout-amount {
    font-size: 16px;
    font-weight: 800;
    color: #de3e35;
    font-family: 'Outfit', sans-serif;
}
.history-right .winners-count {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
}

/* Clickable Card Link Wrappers */
.history-item-link, .history-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}
.history-item-link:hover, .history-card-link:hover {
    text-decoration: none !important;
    color: inherit !important;
}

/* Mobile View Cards List (Hidden by default on Desktop) */
.history-mobile-list {
    display: none;
}

/* Mobile View Optimization Media Queries */
@media (max-width: 768px) {
    .content-card {
        padding: 16px;
        margin-bottom: 20px;
    }
    h1 {
        font-size: 20px;
        margin-bottom: 10px;
    }
    .intro-text {
        font-size: 14.5px;
        margin-bottom: 20px;
    }
    .info-grid-box {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-bottom: 20px;
    }
    .info-item-card {
        padding: 12px;
    }

    /* Responsive padding for 1등 당첨 이력 섹션 */
    .history-section-wrapper {
        padding: 16px !important;
    }

    /* Hide Desktop Table and Show Mobile Cards */
    .history-desktop-table {
        display: none !important;
    }
    
    .history-mobile-list {
        display: flex !important;
        flex-direction: column;
        gap: 16px;
        max-height: 500px;
        overflow-y: auto;
        padding-right: 4px;
        margin-top: 15px;
    }

    .history-mobile-list::-webkit-scrollbar {
        width: 5px;
    }
    .history-mobile-list::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.02);
        border-radius: 3px;
    }
    .history-mobile-list::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 3px;
    }

    .history-mobile-card {
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid var(--border-color);
        border-radius: 16px;
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        transition: all 0.2s ease;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    }
    .history-mobile-card:hover {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
        border-color: #fbbf24;
    }

    .mobile-card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .mobile-round-info {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mobile-round-badge {
        background: #de3e35;
        color: #ffffff;
        font-weight: 700;
        padding: 4px 14px;
        border-radius: 9999px;
        font-size: 13px;
        display: inline-block;
        line-height: 1;
    }

    .mobile-draw-date {
        color: var(--text-secondary);
        font-size: 14px;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .calendar-icon {
        font-size: 14px;
        vertical-align: middle;
    }

    .mobile-card-payout {
        display: flex;
        align-items: center;
        font-size: 15px;
        color: var(--text-primary);
        margin-top: 2px;
    }

    .payout-label, .winners-label {
        font-weight: 700;
        color: var(--text-secondary);
        margin-right: 4px;
    }

    .payout-value {
        color: #fbbf24;
        font-weight: 800;
        font-size: 16px;
    }

    .divider {
        color: var(--border-color);
        margin: 0 10px;
        font-weight: 300;
    }

    .winners-value {
        color: #34d399;
        font-weight: 800;
        font-size: 16px;
    }

    .mobile-card-dotted-line {
        border-bottom: 1px dashed var(--border-color);
        margin: 4px 0;
    }

    .mobile-card-balls {
        display: flex;
        align-items: center;
        gap: 6px;
        justify-content: flex-start;
    }

    .balls-container {
        display: flex;
        gap: 6px;
    }

    .mobile-card-balls .lotto-ball-small {
        width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 800;
        color: #ffffff;
        text-shadow: none !important;
        box-shadow: none !important;
        flex-shrink: 0;
    }

    .mobile-card-balls .ball-yellow { background: radial-gradient(circle at 30% 30%, #ffe066 0%, #f59e0b 70%, #ca8a04 100%) !important; border: 1px solid #eab308; }
    .mobile-card-balls .ball-blue { background: radial-gradient(circle at 30% 30%, #74c0fc 0%, #3b82f6 70%, #1d4ed8 100%) !important; border: 1px solid #3b82f6; }
    .mobile-card-balls .ball-red { background: radial-gradient(circle at 30% 30%, #ff8787 0%, #ef4444 70%, #b91c1c 100%) !important; border: 1px solid #ef4444; }
    .mobile-card-balls .ball-grey { background: radial-gradient(circle at 30% 30%, #e5e7eb 0%, #6b7280 70%, #374151 100%) !important; border: 1px solid #6b7280; }
    .mobile-card-balls .ball-green { background: radial-gradient(circle at 30% 30%, #63e6be 0%, #10b981 70%, #047857 100%) !important; border: 1px solid #10b981; }

    .bonus-plus {
        color: #718096;
        font-size: 16px;
        font-weight: 700;
        margin: 0 4px;
        flex-shrink: 0;
    }
}
