/**
 * Websky PDF Generator - Frontend Styles
 */

/* Button Container */
.wpdf-button-container {
    display: inline-block;
    position: relative;
    margin: 10px 0;
}

/* Download Button */
.wpdf-download-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #cd0f16;
    color: white;
    border: none;
    border-radius: 50px !important;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.wpdf-download-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
    background: #cd0f16;
}

.wpdf-download-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 5px rgba(50, 50, 93, 0.1), 0 1px 2px rgba(0, 0, 0, 0.08);
}

.wpdf-download-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #ccc;
}

.wpdf-download-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.wpdf-download-button:active::before {
    width: 300px;
    height: 300px;
}

/* Icon */
.wpdf-icon {
    font-size: 20px;
    display: inline-flex;
    align-items: center;
}

/* Loading State */
.wpdf-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #666;
    font-size: 14px;
}

.wpdf-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: wpdf-spin 1s linear infinite;
}

@keyframes wpdf-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.wpdf-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    z-index: 999999;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 300px;
}

.wpdf-notification-show {
    transform: translateX(0);
}

.wpdf-notification-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.wpdf-notification-error {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
}

/* Alternative Button Styles */
.wpdf-button-style-minimal .wpdf-download-button {
    background: transparent;
    color: #333;
    border: 2px solid #333;
    box-shadow: none;
}

.wpdf-button-style-minimal .wpdf-download-button:hover {
    background: #333;
    color: white;
    transform: none;
}

.wpdf-button-style-flat .wpdf-download-button {
    background: #0073aa;
    border-radius: 3px;
    box-shadow: none;
}

.wpdf-button-style-flat .wpdf-download-button:hover {
    background: #005a87;
    transform: none;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .wpdf-download-button {
        font-size: 14px;
        padding: 10px 20px;
    }

    .wpdf-icon {
        font-size: 18px;
    }

    .wpdf-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media screen and (max-width: 480px) {
    .wpdf-download-button {
        width: 100%;
        justify-content: center;
    }

    .wpdf-button-container {
        display: block;
        width: 100%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wpdf-loading {
        background: #333;
        border-color: #555;
        color: #ccc;
    }

    .wpdf-spinner {
        border-color: #555;
        border-top-color: #667eea;
    }
}

/* Print Styles */
@media print {
    .wpdf-button-container {
        display: none !important;
    }
}