/**
 * Device Smart Buttons - Frontend Styles
 */

.dsb-container {
    width: 100%;
}

.dsb-buttons-wrapper {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.dsb-button-wrapper {
    display: none;
}

.dsb-button {
    display: inline-block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dsb-button-text {
    color: #ffffff;
    background-color: #007bff;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 500;
}

.dsb-button-text:hover {
    background-color: #0056b3;
    text-decoration: none;
}

.dsb-button-image img {
    display: block;
    max-width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}

.dsb-button-image:hover img {
    opacity: 0.8;
}

/* Device-specific visibility - controlled by JavaScript */
body.dsb-ios .dsb-device-ios,
body.dsb-android .dsb-device-android,
body.dsb-desktop .dsb-device-desktop {
    display: inline-block;
}

/* Desktop showing both store buttons option */
body.dsb-desktop .dsb-container[data-desktop-show-stores="yes"] .dsb-device-ios,
body.dsb-desktop .dsb-container[data-desktop-show-stores="yes"] .dsb-device-android {
    display: inline-block;
}

body.dsb-desktop .dsb-container[data-desktop-show-stores="yes"] .dsb-device-desktop {
    display: none;
}

/* Editor mode - show all buttons with labels */
.dsb-editor-visible {
    display: inline-block !important;
    position: relative;
}

.dsb-editor-visible::before {
    content: attr(data-device-label);
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 3px;
    white-space: nowrap;
}

.dsb-device-ios.dsb-editor-visible::before {
    content: "iOS";
}

.dsb-device-android.dsb-editor-visible::before {
    content: "Android";
}

.dsb-device-android.dsb-secondary-button.dsb-editor-visible::before {
    content: "Android 2";
}

.dsb-device-desktop.dsb-editor-visible::before {
    content: "Desktop";
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dsb-buttons-wrapper {
        flex-direction: column;
    }
}
