/**
 * Frontend CSS for Fileaxa Plan Redirector
 * Styles for the purchase buttons and redirect functionality
 */

/* Button Container */
.fileaxa-button-container {
    display: inline-block;
    margin: 10px 0;
}

/* Base Button Styles */
.fileaxa-plan-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    min-width: 180px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

.fileaxa-plan-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.fileaxa-plan-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.fileaxa-plan-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

/* Button Styles */
.fileaxa-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.fileaxa-button-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    color: white;
}

.fileaxa-button-lite {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #2d3748;
}

.fileaxa-button-lite:hover {
    background: linear-gradient(135deg, #96e0dd 0%, #fcc5d1 100%);
    color: #2d3748;
}

.fileaxa-button-plus {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.fileaxa-button-plus:hover {
    background: linear-gradient(135deg, #ee82f9 0%, #f3455a 100%);
    color: white;
}

.fileaxa-button-max {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.fileaxa-button-max:hover {
    background: linear-gradient(135deg, #3d9bfd 0%, #00e1fd 100%);
    color: white;
}

.fileaxa-button-secondary {
    background: linear-gradient(135deg, #cbd5e0 0%, #e2e8f0 100%);
    color: #4a5568;
}

.fileaxa-button-secondary:hover {
    background: linear-gradient(135deg, #b8c5d1 0%, #d5dde7 100%);
    color: #4a5568;
}

/* Loading State */
.fileaxa-plan-button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.fileaxa-plan-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: fileaxa-spin 1s linear infinite;
}

@keyframes fileaxa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Icon Support */
.fileaxa-plan-button .button-icon {
    margin-right: 8px;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fileaxa-plan-button {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .fileaxa-plan-button {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Button Sizes */
.fileaxa-plan-button.small {
    padding: 8px 16px;
    font-size: 14px;
    min-width: 120px;
}

.fileaxa-plan-button.large {
    padding: 16px 32px;
    font-size: 18px;
    min-width: 220px;
}

/* Accessibility */
.fileaxa-plan-button:focus-visible {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .fileaxa-plan-button {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .fileaxa-plan-button {
        transition: none;
    }
    
    .fileaxa-plan-button:hover {
        transform: none;
    }
    
    @keyframes fileaxa-spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .fileaxa-button-secondary {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        color: #e2e8f0;
    }
    
    .fileaxa-button-secondary:hover {
        background: linear-gradient(135deg, #3d4555 0%, #252c3a 100%);
        color: #e2e8f0;
    }
}

/* Button Groups */
.fileaxa-button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.fileaxa-button-group .fileaxa-plan-button {
    flex: 1;
    min-width: 150px;
}

@media (max-width: 768px) {
    .fileaxa-button-group {
        flex-direction: column;
    }
    
    .fileaxa-button-group .fileaxa-plan-button {
        flex: none;
        width: 100%;
    }
}

/* Success/Error States */
.fileaxa-plan-button.success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.fileaxa-plan-button.error {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

/* Pulse Animation for Call-to-Action */
.fileaxa-plan-button.pulse {
    animation: fileaxa-pulse 2s infinite;
}

@keyframes fileaxa-pulse {
    0% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0 10px rgba(102, 126, 234, 0.1);
    }
    100% {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
}

/* Tooltip Support */
.fileaxa-plan-button[data-tooltip] {
    position: relative;
}

.fileaxa-plan-button[data-tooltip]:hover::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

.fileaxa-plan-button[data-tooltip]:hover::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}
