/* Binance Gift Card Payment - Frontend Styles */

.bgcp-form-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.bgcp-instructions {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #F0B90B;
}

.bgcp-instructions h3 {
    margin-top: 0;
    color: #333;
    font-size: 24px;
}

.bgcp-instructions p {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.6;
}

.bgcp-required-cards {
    margin-top: 20px;
}

.bgcp-required-cards h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.bgcp-card-requirement {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.bgcp-card-requirement:hover {
    border-color: #F0B90B;
    box-shadow: 0 2px 8px rgba(240, 185, 11, 0.2);
}

.bgcp-card-amount {
    font-weight: bold;
    font-size: 16px;
    color: #333;
}

.bgcp-card-count {
    color: #666;
    margin-left: 10px;
}

.bgcp-buy-button {
    background: #F0B90B;
    color: #000;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.bgcp-buy-button:hover {
    background: #d4a00a;
    color: #000;
    text-decoration: none;
    transform: translateY(-1px);
}

.bgcp-form {
    margin-top: 30px;
}

.bgcp-form-fields h4 {
    margin-bottom: 20px;
    color: #333;
    font-size: 18px;
    border-bottom: 2px solid #F0B90B;
    padding-bottom: 10px;
}

.bgcp-form-field {
    margin-bottom: 20px;
}

.bgcp-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.bgcp-form-field .required {
    color: #e74c3c;
    margin-left: 3px;
}

.bgcp-code-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.bgcp-code-input:focus {
    outline: none;
    border-color: #F0B90B;
    box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.2);
}

.bgcp-code-input.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.bgcp-form-actions {
    margin-top: 30px;
    text-align: center;
}

.bgcp-submit-button {
    background: #F0B90B;
    color: #000;
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.bgcp-submit-button:hover:not(:disabled) {
    background: #d4a00a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(240, 185, 11, 0.3);
}

.bgcp-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

#bgcp-form-messages {
    margin-top: 20px;
}

.bgcp-success {
    padding: 15px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    margin-bottom: 15px;
}

.bgcp-error {
    padding: 15px;
    background: #f8d7da;
    color: #000;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    margin-bottom: 15px;
}

.bgcp-payment-instructions {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.bgcp-payment-instructions h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #F0B90B;
    padding-bottom: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .bgcp-form-container {
        margin: 10px;
        padding: 15px;
    }
    
    .bgcp-card-requirement {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .bgcp-card-amount,
    .bgcp-card-count {
        margin: 0;
    }
    
    .bgcp-buy-button {
        align-self: stretch;
        text-align: center;
    }
    
    .bgcp-code-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .bgcp-submit-button {
        width: 100%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .bgcp-form-container {
        margin: 5px;
        padding: 10px;
    }
    
    .bgcp-instructions {
        padding: 15px;
    }
    
    .bgcp-instructions h3 {
        font-size: 20px;
    }
    
    .bgcp-required-cards h4,
    .bgcp-form-fields h4 {
        font-size: 16px;
    }
}


/* Provider Selection Styles */
.bgcp-provider-selection {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #F0B90B;
}

.bgcp-provider-selection h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.bgcp-provider-dropdown {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.bgcp-provider-dropdown:focus {
    outline: none;
    border-color: #F0B90B;
    box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.2);
}

.bgcp-provider-info {
    margin-top: 20px;
}

.bgcp-provider-details {
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

.bgcp-provider-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.bgcp-provider-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

.bgcp-provider-logo-inline {
    height: 30px;
    width: auto;
}

.bgcp-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bgcp-payment-label {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.bgcp-payment-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.bgcp-payment-icon {
    height: 20px;
    width: auto;
    border-radius: 3px;
    transition: transform 0.2s ease;
}

.bgcp-payment-icon:hover {
    transform: scale(1.1);
}

/* Field Error Styles */
.bgcp-field-error {
    color: #000;
    font-size: 14px;
    margin-top: 5px;
    padding: 8px 12px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

/* Mobile Responsive for Provider Selection */
@media (max-width: 768px) {
    .bgcp-provider-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }
    
    .bgcp-provider-name {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .bgcp-payment-icons {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .bgcp-provider-selection {
        padding: 15px;
    }
    
    .bgcp-provider-selection h4 {
        font-size: 16px;
    }
    
    .bgcp-payment-icon {
        height: 18px;
    }
}



/* Success Animation Styles */
.bgcp-success-container {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #28a745;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.bgcp-success-animation {
    margin-bottom: 30px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bgcp-success-animation.animate {
    opacity: 1;
    transform: scale(1);
}

.bgcp-checkmark-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #28a745;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
    animation: pulse 2s infinite;
}

.bgcp-checkmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px;
    height: 45px;
    border: solid white;
    border-width: 0 4px 4px 0;
    transform: translate(-50%, -60%) rotate(45deg);
    animation: checkmark-draw 0.5s ease-in-out 0.3s both;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
    }
    50% {
        box-shadow: 0 4px 30px rgba(40, 167, 69, 0.5);
    }
    100% {
        box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
    }
}

@keyframes checkmark-draw {
    0% {
        height: 0;
        width: 0;
        opacity: 1;
    }
    20% {
        height: 0;
        width: 10px;
        opacity: 1;
    }
    40% {
        height: 25px;
        width: 10px;
        opacity: 1;
    }
    100% {
        height: 25px;
        width: 10px;
        opacity: 1;
    }
}

.bgcp-success-message {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.bgcp-success-message.show {
    opacity: 1;
    transform: translateY(0);
}

.bgcp-success-message h3 {
    color: #28a745;
    font-size: 28px;
    margin-bottom: 15px;
    font-weight: 700;
}

.bgcp-success-message p {
    color: #495057;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.bgcp-success-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.bgcp-detail-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 12px 20px;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 8px;
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.bgcp-detail-item:hover {
    background: rgba(40, 167, 69, 0.15);
    transform: translateX(5px);
}

.bgcp-icon {
    font-size: 20px;
    margin-right: 12px;
    min-width: 24px;
}

.bgcp-detail-item span:last-child {
    color: #495057;
    font-weight: 500;
    font-size: 14px;
}

/* Confetti Animation */
.bgcp-confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #f0b90b;
    top: -10px;
    z-index: 9999;
    animation: confetti-fall linear forwards;
    pointer-events: none;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Mobile Responsive for Success Animation */
@media (max-width: 768px) {
    .bgcp-success-container {
        padding: 30px 15px;
        margin: 15px 0;
    }
    
    .bgcp-checkmark-circle {
        width: 60px;
        height: 60px;
    }
    
    .bgcp-checkmark {
        width: 18px;
        height: 32px;
        border-width: 0 3px 3px 0;
    }
    
    .bgcp-success-message h3 {
        font-size: 24px;
    }
    
    .bgcp-success-message p {
        font-size: 15px;
    }
    
    .bgcp-detail-item {
        padding: 10px 15px;
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .bgcp-icon {
        margin-right: 0;
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    .bgcp-success-container {
        padding: 20px 10px;
    }
    
    .bgcp-checkmark-circle {
        width: 50px;
        height: 50px;
    }
    
    .bgcp-checkmark {
        width: 15px;
        height: 25px;
        border-width: 0 2px 2px 0;
    }
    
    .bgcp-success-message h3 {
        font-size: 20px;
    }
    
    .bgcp-success-message p {
        font-size: 14px;
    }
    
    .bgcp-detail-item span:last-child {
        font-size: 13px;
    }
}

/* Enhanced Loading State */
.bgcp-submit-button.loading {
    position: relative;
    color: transparent;
}

.bgcp-submit-button.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #000;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

/* Improved Error Styling */
.bgcp-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #dc3545;
    border-radius: 8px;
    position: relative;
}

.bgcp-error::before {
    content: "⚠️";
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 18px;
}

.bgcp-error {
    padding-left: 50px;
}

/* Smooth Transitions */
* {
    transition: all 0.3s ease;
}

.bgcp-form-container * {
    transition: all 0.3s ease;
}

