/* Overlay */
.dbf-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Overlay แสดง */
.dbf-overlay.dbf-show {
    opacity: 1;
    pointer-events: auto;
}

/* Container */
.dbf-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    max-width: 1400px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: translateY(40px) scale(0.95);
    opacity: 0;
    transition: all 0.4s ease;
}

/* Container แสดง */
.dbf-overlay.dbf-show .dbf-container {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Close Button */
.dbf-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s ease;
    color: #6b7280;
}
.dbf-close:hover {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    transform: scale(1.05);
}
.dbf-close::before,
.dbf-close::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
}
.dbf-close::before { transform: rotate(45deg); }
.dbf-close::after { transform: rotate(-45deg); }

/* Content */
.dbf-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Image Section */
.dbf-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    background: #000;
}

/* Image */
.dbf-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

/* Overlay Content */
.dbf-overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 40px 30px 30px;
    color: white;
    text-align: center;
}
.dbf-title {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.dbf-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Actions */
.dbf-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.dbf-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Kanit', sans-serif;
}

/* Primary: ปุ่มหลัก */
.dbf-btn-primary {
    background: rgba(255, 255, 255, 0.9);
    color: #22c55e;
    backdrop-filter: blur(10px);
}
.dbf-btn-primary:hover {
    background: white;
    transform: translateY(-1px);
}

/* Secondary: ปิด */
.dbf-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.dbf-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Tertiary: ไม่ต้องแสดงอีก */
.dbf-btn-tertiary {
    background: #ef4444;  /* แดง */
    color: white;
}
.dbf-btn-tertiary:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .dbf-container {
        width: 95%;
        margin: 10px;
        border-radius: 15px;
    }
    .dbf-title { font-size: 1.8rem; }
    .dbf-subtitle { font-size: 0.9rem; }
    .dbf-overlay-content { padding: 30px 20px 25px; }
    .dbf-actions { flex-direction: column; gap: 8px; }
    .dbf-btn { width: 100%; padding: 12px 24px; }
}
