/* Buy button styles */
.waply-buy-button {
    display: inline-block;
    padding: 8px 16px;
    margin: 5px 0;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
}

/* Default style */
.waply-style-default {
    background-color: #2271b1;
    color: #ffffff !important;
}

.waply-style-default:hover {
    background-color: #135e96;
}

/* Modern style */
.waply-style-modern {
    background-color: #3498db;
    color: #ffffff !important;
    border-radius: 30px;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
}

.waply-style-modern:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
}

/* Minimal style */
.waply-style-minimal {
    background-color: transparent;
    color: #2271b1 !important;
    border: 1px solid #2271b1;
}

.waply-style-minimal:hover {
    background-color: #f0f0f0;
    color: #135e96 !important;
    border-color: #135e96;
}

/* Flat style */
.waply-style-flat {
    background-color: #4CAF50;
    color: white !important;
    border-radius: 0;
}

.waply-style-flat:hover {
    background-color: #3e8e41;
}

/* Button states */
.waply-buy-button.loading {
    opacity: 0.7;
    cursor: wait;
}

.waply-buy-button.loading .spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 5px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.waply-buy-button.success {
    background-color: #28a745;
}

.waply-buy-button.error {
    background-color: #dc3545;
}

/* View cart link */
.waply-view-cart {
    display: inline-block;
    margin-left: 10px;
    color: #2271b1;
    text-decoration: underline;
}

.waply-view-cart:hover {
    color: #135e96;
}

/* Notification system */
.waply-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-left: 4px solid #2271b1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    display: flex;
    align-items: center;
    max-width: 350px;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.waply-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.waply-notification-success {
    border-left-color: #28a745;
}

.waply-notification-error {
    border-left-color: #dc3545;
}

.waply-notification .dashicons {
    margin-right: 10px;
    font-size: 20px;
}

.waply-notification-success .dashicons {
    color: #28a745;
}

.waply-notification-error .dashicons {
    color: #dc3545;
}

.waply-notification p {
    margin: 0;
    flex: 1;
}

.waply-notification .close-notification {
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
}

.waply-notification .close-notification:hover {
    color: #666;
}

/* Mini cart */
.waply-cart-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.waply-cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.waply-cart-icon.bounce {
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

.waply-mini-cart {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 15px;
    z-index: 100;
    display: none;
}

.waply-mini-cart.open {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(10px);}
    to {opacity: 1; transform: translateY(0);}
}

.waply-mini-cart-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.waply-mini-cart-item:last-child {
    border-bottom: none;
}

.waply-mini-cart-item-name {
    flex: 1;
}

.waply-mini-cart-item-price {
    font-weight: bold;
}

.waply-mini-cart-total {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    font-weight: bold;
}

.waply-mini-cart-actions {
    margin-top: 15px;
    text-align: center;
}

.waply-mini-cart-actions a {
    display: inline-block;
    padding: 8px 16px;
    background: #2271b1;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin: 0 5px;
}

.waply-mini-cart-actions a:hover {
    background: #135e96;
}

/* Tiered Product Button Styles */
.waply-payment-button-container .waply-tier-selection {
    margin: 20px 0;
}

.waply-tier-selection h4 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* Tier styling removed - single products only */

.waply-tier-price {
    font-size: 28px;
    font-weight: 700;
    color: #4a90e2;
    margin: 10px 0;
}

.waply-tier-sites {
    color: #666;
    margin: 10px 0 20px 0;
    font-size: 14px;
}

.waply-tier-button {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 8px;
    background: #4a90e2;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.waply-tier-button:hover {
    background: #357abd;
    transform: translateY(-1px);
}

/* Responsive styles */
@media (max-width: 768px) {
    .waply-notification {
        left: 20px;
        right: 20px;
        max-width: none;
    }

    .waply-mini-cart {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 4px 4px 0 0;
        max-height: 80vh;
        overflow-y: auto;
    }

    .waply-tiers-grid.grid,
    .waply-tiers-grid.horizontal {
        grid-template-columns: 1fr;
    }
}

/* Free Download Button & Modal Styles */
.waply-free-download-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 16px;
    text-align: center;
}

.waply-free-download-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.waply-free-download-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.waply-free-download-modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 80%;
    max-width: 500px;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.waply-free-download-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.waply-free-download-close:hover {
    color: #333;
}

.waply-free-download-modal h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 22px;
}

.waply-free-download-description {
    margin-bottom: 20px;
    color: #666;
}

.waply-form-group {
    margin-bottom: 15px;
}

.waply-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.waply-form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.waply-form-group input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.waply-free-download-submit {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
}

.waply-free-download-submit:hover {
    background-color: #45a049;
}

.waply-free-download-message {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
}

.waply-free-download-message .waply-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    border-radius: 4px;
}

.waply-free-download-message .waply-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .waply-free-download-modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 15px;
    }
}