/**
 * Dealer Purchase Button - Frontend Styles
 * Version: 2.4.0
 */

/* Main button wrapper */
.dpb-dealer-button-wrapper {
    margin: 15px 0;
    clear: both;
    display: block;
}

/* Main button styles */
.dpb-dealer-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
    padding: 0 24px;
    background: #000000;
    background-color: #000000;
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
    line-height: 1.5;
    box-sizing: border-box;
}

.dpb-dealer-button:hover {
    transform: translateY(-2px);
    background: #1a1a1a;
    background-color: #1a1a1a;
}

.dpb-dealer-button:active {
    transform: translateY(0);
}

.dpb-dealer-button:focus {
    outline: 2px solid #000000;
    outline-offset: 2px;
}

/* Site name suffix */
.dpb-site-name {
    font-weight: 400;
    font-size: 12px;
    opacity: 0.9;
    text-transform: none;
    margin-left: 5px;
}

/* Unavailable state */
.dpb-dealer-button-wrapper.dpb-unavailable {
    padding: 12px 24px;
    background: #f5f5f5;
    border-radius: 6px;
    display: inline-block;
    border: 1px solid #e0e0e0;
}

.dpb-unavailable-text {
    color: #999;
    font-size: 14px;
    display: block;
}

/* Shortcode specific */
.dpb-dealer-button-wrapper.dpb-shortcode {
    margin: 10px 0;
}

/* Dealer Chain Styles */
.dpb-dealer-chain {
    margin: 15px 0;
}

.dpb-dealer-chain.dpb-dealer-chain-list {
    padding-left: 20px;
}

.dpb-dealer-chain .dpb-dealer-list {
    list-style: disc;
    margin: 10px 0;
    padding-left: 20px;
}

.dpb-dealer-chain .dpb-dealer-list li {
    margin: 8px 0;
}

.dpb-dealer-chain .dpb-dealer-list a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.dpb-dealer-chain .dpb-dealer-list a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Dropdown style */
.dpb-dealer-dropdown {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    min-width: 200px;
}

.dpb-dealer-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons style */
.dpb-dealer-buttons .dpb-dealer-button {
    margin: 5px 5px 5px 0;
}

/* WooCommerce integration */
.woocommerce .dpb-dealer-button-wrapper {
    margin: 20px 0;
}

.woocommerce .dpb-dealer-button-wrapper.formatted {
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .dpb-dealer-chain .dpb-dealer-buttons .dpb-dealer-button {
        width: 100%;
        margin: 5px 0;
    }

    .dpb-dealer-dropdown {
        width: 100%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dpb-dealer-button-wrapper.dpb-unavailable {
        background: #2a2a2a;
        border-color: #444;
    }

    .dpb-unavailable-text {
        color: #aaa;
    }

    .dpb-dealer-dropdown {
        background: #2a2a2a;
        color: #fff;
        border-color: #444;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .dpb-dealer-button {
        border: 2px solid #000;
    }

    .dpb-dealer-button-wrapper.dpb-unavailable {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dpb-dealer-button,
    .dpb-dealer-chain a {
        transition: none;
    }
}

/* Print styles */
@media print {
    .dpb-dealer-button-wrapper {
        display: none;
    }
}

/* Loading state */
.dpb-dealer-button.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.dpb-dealer-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: dpb-spin 0.8s linear infinite;
}

@keyframes dpb-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Pulse animation for new buttons */
.dpb-dealer-button.pulse {
    animation: dpb-pulse 2s ease-in-out infinite;
}

@keyframes dpb-pulse {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(102, 126, 234, 0.6);
    }
}

/* Custom style variants */
.dpb-dealer-button.style-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.dpb-dealer-button.style-outline:hover {
    background: #667eea;
    color: #fff;
}

.dpb-dealer-button.style-minimal {
    background: transparent;
    color: #667eea;
    padding: 8px 16px;
    box-shadow: none;
}

.dpb-dealer-button.style-minimal:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: none;
    box-shadow: none;
}

.dpb-dealer-button.style-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.dpb-dealer-button.style-success:hover {
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.4);
}

.dpb-dealer-button.style-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.dpb-dealer-button.style-warning:hover {
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}
