/* Damla Button Gallery Frontend Styles */

/* Elementor widget wrapper için özel kurallar */
.elementor-widget-damla-button-gallery-widget {
    width: auto !important;
    max-width: none !important;
    float: none !important;
    clear: none !important;
    display: block !important;
}

.elementor-widget-damla-button-gallery-widget .elementor-widget-container {
    width: auto !important;
    max-width: none !important;
    float: none !important;
    clear: none !important;
}

.dbg-gallery-container {
    width: auto; /* 100% yerine auto yapıldı */
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    /* Elementor sütun içinde kullanım için */
    max-width: none;
    float: none;
    clear: none;
}

.dbg-button {
    display: inline-block;
    width: auto; /* 100% yerine auto yapıldı */
    min-width: 200px; /* Minimum genişlik */
    max-width: 100%; /* Maksimum genişlik */
    padding: 12px 24px;
    background-color: #0073aa;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.dbg-button:hover {
    background-color: #005a87;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dbg-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.dbg-button:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .dbg-button {
        padding: 10px 20px;
        font-size: 14px;
        width: auto;
        min-width: 150px;
    }
    
    .elementor-widget-damla-button-gallery-widget {
        width: auto !important;
    }
}

@media (max-width: 480px) {
    .dbg-button {
        padding: 8px 16px;
        font-size: 13px;
        width: auto;
        min-width: 120px;
    }
    
    .elementor-widget-damla-button-gallery-widget {
        width: auto !important;
    }
}

/* Galeri durumları */
.dbg-no-gallery,
.dbg-empty-gallery {
    padding: 20px;
    text-align: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #6c757d;
    font-style: italic;
}

.dbg-no-gallery {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Özel durumlar için */
.dbg-gallery-container[data-layout="grid"] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.dbg-gallery-container[data-layout="grid"] .dbg-button {
    width: auto;
    min-width: 200px;
    max-width: 100%;
    margin: 0;
}

.dbg-gallery-container[data-layout="horizontal"] {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

.dbg-gallery-container[data-layout="horizontal"] .dbg-button {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

/* Animasyonlar */
.dbg-button {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading durumu */
.dbg-gallery-container.loading {
    opacity: 0.6;
    pointer-events: none;
}

.dbg-gallery-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Erişilebilirlik iyileştirmeleri */
.dbg-button[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.dbg-button:focus-visible {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Zamanlanmış yazılar için özel stiller */
.dbg-button.dbg-scheduled {
    position: relative;
    opacity: 0.7;
    border: 2px dashed #0073aa !important;
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    cursor: not-allowed;
}

.dbg-button.dbg-scheduled:hover {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    transform: none;
    box-shadow: none;
}

.dbg-scheduled-badge {
    display: block;
    font-size: 12px;
    color: #0073aa;
    margin-top: 5px;
    font-style: italic;
    font-weight: normal;
}

/* Zamanlanmış yazılar yayınlandığında otomatik stil değişimi */
.dbg-button.dbg-scheduled.published {
    opacity: 1;
    border: none !important;
    background-color: #0073aa !important;
    color: #ffffff !important;
    cursor: pointer;
}

.dbg-button.dbg-scheduled.published:hover {
    background-color: #005a87 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Ek animasyonlar ve durumlar */
.dbg-button.clicked {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.dbg-button.hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.dbg-button.visible {
    animation: fadeInUp 0.6s ease-out;
}

.dbg-button.error {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

/* Responsive layout sınıfları */
.dbg-gallery-container.mobile-layout .dbg-button {
    padding: 10px 20px;
    font-size: 14px;
    margin: 5px 0;
}

.dbg-gallery-container.small-mobile-layout .dbg-button {
    padding: 8px 16px;
    font-size: 13px;
    margin: 3px 0;
}

/* Print stilleri */
@media print {
    .dbg-button {
        background-color: transparent !important;
        color: #000 !important;
        border: 1px solid #000 !important;
        box-shadow: none !important;
        transform: none !important;
    }
    
    .dbg-button:hover {
        background-color: transparent !important;
        transform: none !important;
    }
    
    .dbg-scheduled-badge {
        display: none !important;
    }
}
