/**
 * Easy PIX WP - Modal Styles (Base + Light + Dark)
 * 
 * Design baseado no unitv-recarga plugin
 * 
 * @package Easy_Pix_WP
 * @since   1.0.0
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */
.easypix-wrapper,
.easypix-modal-overlay {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.easypix-wrapper *,
.easypix-modal-overlay * {
    box-sizing: border-box;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes easypix-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes easypix-fadeIn {
    from { 
        opacity: 0; 
        transform: scale(0.95) translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

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

@keyframes easypix-toastIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes easypix-toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ==========================================================================
   Button Styles - Front-end trigger buttons
   ========================================================================== */
.easypix-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 1rem 1.75rem !important;
    border: none !important;
    border-radius: 0.75rem !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2) !important;
}

.easypix-button:hover {
    transform: scale(1.02) !important;
}

.easypix-button:active {
    transform: scale(0.98) !important;
}

.easypix-btn-icon {
    display: flex;
    align-items: center;
}

.easypix-btn-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Button Colors */
.easypix-btn-blue {
    background: linear-gradient(to right, #2563EB, #4F46E5) !important;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.25) !important;
}
.easypix-btn-blue:hover {
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4) !important;
}

.easypix-btn-green {
    background: linear-gradient(to right, #059669, #0D9488) !important;
    box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.25) !important;
}
.easypix-btn-green:hover {
    box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.4) !important;
}

.easypix-btn-purple {
    background: linear-gradient(to right, #7C3AED, #DB2777) !important;
    box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.25) !important;
}
.easypix-btn-purple:hover {
    box-shadow: 0 10px 15px -3px rgba(124, 58, 237, 0.4) !important;
}

.easypix-btn-amber {
    background: linear-gradient(to right, #F59E0B, #EA580C) !important;
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.25) !important;
}
.easypix-btn-amber:hover {
    box-shadow: 0 10px 15px -3px rgba(245, 158, 11, 0.4) !important;
}

.easypix-btn-red {
    background: linear-gradient(to right, #DC2626, #E11D48) !important;
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.25) !important;
}
.easypix-btn-red:hover {
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.4) !important;
}

/* ==========================================================================
   Modal Overlay
   ========================================================================== */
.easypix-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
}

.easypix-modal-overlay.active {
    display: block;
}

.easypix-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* ==========================================================================
   Modal Container
   ========================================================================== */
.easypix-modal-container {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    pointer-events: none;
}

.easypix-modal-content {
    position: relative;
    width: 100%;
    max-width: 28rem;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    pointer-events: auto;
    max-height: 90vh;
    overflow-y: auto;
    animation: easypix-fadeIn 0.3s ease-out forwards;
}

.easypix-modal-inner {
    padding: 2rem;
}

/* ==========================================================================
   Modal Header
   ========================================================================== */
.easypix-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.easypix-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.easypix-modal-subtitle {
    font-size: 0.875rem;
    margin: 0;
}

.easypix-modal-close {
    padding: 0.5rem !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: color 0.2s !important;
    line-height: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.easypix-modal-close svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* ==========================================================================
   Steps
   ========================================================================== */
.easypix-step {
    display: none;
}

.easypix-step.active {
    display: block;
    animation: easypix-slideUp 0.3s ease;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */
.easypix-form-group {
    margin-bottom: 1rem;
}

.easypix-form-label {
    display: block;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    margin-left: 0.25rem;
}

.easypix-form-input-wrapper {
    position: relative;
}

.easypix-form-input-wrapper svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1.25rem;
    height: 1.25rem;
    pointer-events: none;
}

.easypix-form-input {
    width: 100% !important;
    border-radius: 1rem !important;
    padding: 1rem 1rem 1rem 3rem !important;
    font-size: 1rem !important;
    transition: border-color 0.2s !important;
    font-family: inherit !important;
    outline: none !important;
}

.easypix-form-input:focus {
    outline: none !important;
}

/* ==========================================================================
   Submit Button - Gerar PIX
   ========================================================================== */
.easypix-submit-button {
    width: 100% !important;
    padding: 1.25rem !important;
    border-radius: 1rem !important;
    font-weight: 700 !important;
    font-size: 1.125rem !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    transition: all 0.2s !important;
    margin-top: 0.5rem !important;
    font-family: inherit !important;
}

.easypix-submit-button:active {
    transform: scale(0.95);
}

.easypix-submit-button svg {
    width: 1.5rem !important;
    height: 1.5rem !important;
}

/* ==========================================================================
   Security Badge
   ========================================================================== */
.easypix-security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.easypix-security-badge svg {
    width: 1rem;
    height: 1rem;
}

/* ==========================================================================
   Loading Step
   ========================================================================== */
.easypix-loading-step {
    padding: 3rem 0;
    text-align: center;
}

.easypix-spinner {
    width: 4rem;
    height: 4rem;
    border: 4px solid rgba(59, 130, 246, 0.3);
    border-top-color: #3B82F6;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    animation: easypix-spin 1s linear infinite;
}

.easypix-loading-text {
    font-weight: 700;
    font-size: 1.125rem;
    margin: 0 0 0.5rem;
}

.easypix-loading-subtext {
    font-size: 0.875rem;
    margin: 0;
}

/* ==========================================================================
   PIX Step
   ========================================================================== */
.easypix-pix-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.easypix-pix-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.easypix-pix-subtitle {
    font-size: 0.875rem;
    margin: 0;
}

.easypix-qr-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.easypix-qr-wrapper {
    padding: 1rem;
    background: white !important;
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.easypix-qr-image {
    width: 200px;
    height: 200px;
    display: block;
}

/* Copy Code Section */
.easypix-copy-code-section {
    margin-bottom: 1rem;
}

.easypix-copy-code-wrapper {
    display: flex;
    gap: 0.5rem;
}

.easypix-copy-code-input {
    flex-grow: 1 !important;
    border-radius: 0.75rem !important;
    padding: 1rem !important;
    font-family: monospace !important;
    font-size: 0.625rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    outline: none !important;
}

.easypix-copy-button {
    padding: 1rem !important;
    border: none !important;
    border-radius: 0.75rem !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

.easypix-copy-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Waiting Notice */
.easypix-waiting-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 1rem;
    margin-bottom: 1rem;
}

.easypix-waiting-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-top-color: #3B82F6;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 0.125rem;
    animation: easypix-spin 1s linear infinite;
}

.easypix-waiting-text {
    font-size: 0.75rem;
    line-height: 1.5;
    margin: 0;
}

/* Back Button */
.easypix-back-button {
    width: 100% !important;
    padding: 0.75rem !important;
    background: none !important;
    border: none !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    cursor: pointer !important;
    transition: color 0.2s !important;
    font-family: inherit !important;
}

/* ==========================================================================
   Success Step
   ========================================================================== */
.easypix-success-banner {
    padding: 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.easypix-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    background: #10B981;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.easypix-success-icon svg {
    width: 2rem;
    height: 2rem;
    color: white;
}

.easypix-success-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.easypix-success-subtitle {
    font-size: 0.875rem;
    margin: 0;
}

/* Redirect Section */
.easypix-redirect-section {
    margin-bottom: 0.75rem;
}

.easypix-redirect-button {
    width: 100% !important;
    padding: 1rem !important;
    border-radius: 1rem !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    background: #25D366 !important;
    color: white !important;
    transition: opacity 0.2s !important;
    font-family: inherit !important;
}

.easypix-redirect-button:hover {
    opacity: 0.9;
}

/* Close Button */
.easypix-close-button {
    width: 100% !important;
    padding: 1rem !important;
    border-radius: 1rem !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    font-family: inherit !important;
}

/* Tip Box */
.easypix-tip-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 1rem;
    margin-top: 1rem;
}

.easypix-tip-box svg {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
}

.easypix-tip-text {
    font-size: 0.75rem;
    margin: 0;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
#easypixToastContainer {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.easypix-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.3);
    animation: easypix-toastIn 0.3s ease;
    min-width: 280px;
    max-width: 400px;
}

.easypix-toast.hiding {
    animation: easypix-toastOut 0.3s ease forwards;
}

.easypix-toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.easypix-toast-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.easypix-toast-success .easypix-toast-icon {
    color: #10B981;
}

.easypix-toast-error .easypix-toast-icon {
    color: #EF4444;
}

.easypix-toast-message {
    flex-grow: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 480px) {
    .easypix-modal-inner {
        padding: 1.5rem;
    }
    
    .easypix-qr-image {
        width: 180px;
        height: 180px;
    }
    
    #easypixToastContainer {
        left: 10px;
        right: 10px;
        top: 10px;
    }
    
    .easypix-toast {
        min-width: auto;
        max-width: 100%;
    }
}
