/* Payment Processing Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(139, 92, 246, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
    }
}

@keyframes successPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

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

.payment-btn.processing {
    animation: pulse 2s infinite;
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
    border-color: #8b5cf6;
}

.payment-btn.success {
    animation: successPulse 1s ease-out;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-color: #22c55e;
}

.processing-text {
    animation: fadeInUp 0.5s ease-out;
    display: inline-block;
    margin-left: 8px;
}

.payment-btn i {
    transition: all 0.3s ease;
}

.payment-btn.processing i {
    animation: spin 1s linear infinite;
}

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

/* IBAN Payment Styles */
.iban-payment-info {
    padding: 15px;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 12px;
    margin-top: 15px;
    max-height: 60vh;
    overflow-y: auto;
}

.iban-header {
    text-align: center;
    margin-bottom: 15px;
}

.iban-header h3 {
    color: #e2e8f0;
    font-size: 1.2rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.iban-header p {
    color: #94a3b8;
    font-size: 0.8rem;
    margin: 0;
}

.iban-details {
    background: rgba(31, 41, 55, 0.5);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.iban-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(55, 65, 81, 0.3);
    flex-wrap: wrap;
    gap: 8px;
}

.iban-item:last-child {
    border-bottom: none;
}

.iban-item label {
    color: #94a3b8;
    font-weight: 500;
    min-width: 80px;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.iban-item span {
    color: #e2e8f0;
    font-weight: 600;
    flex: 1;
    text-align: right;
    margin-right: 8px;
    word-break: break-all;
    font-size: 0.8rem;
    line-height: 1.3;
}

.iban-item .copy-btn {
    flex-shrink: 0;
    margin-left: 8px;
    padding: 4px 8px;
    font-size: 0.7rem;
}

.copyable {
    cursor: pointer;
    transition: color 0.3s ease;
}

.copyable:hover {
    color: #8b5cf6;
}

.copy-btn {
    background: #8b5cf6;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #7c3aed;
    transform: translateY(-1px);
}

.iban-instructions {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
}

.iban-instructions h4 {
    color: #e2e8f0;
    margin-bottom: 10px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.iban-instructions ol {
    color: #94a3b8;
    padding-left: 15px;
    margin: 0;
}

.iban-instructions li {
    margin-bottom: 4px;
    line-height: 1.3;
    font-size: 0.8rem;
}

.iban-instructions span {
    color: #8b5cf6;
    font-weight: 600;
}

/* Dekont Upload Styles */
.dekont-upload-section {
    margin: 15px 0;
    padding: 12px;
    background: rgba(31, 41, 55, 0.3);
    border-radius: 8px;
    border: 2px dashed rgba(139, 92, 246, 0.3);
}

.dekont-upload-section h4 {
    color: #e2e8f0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.upload-area {
    border: 2px dashed #8b5cf6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(139, 92, 246, 0.05);
}

.upload-area:hover {
    border-color: #7c3aed;
    background: rgba(139, 92, 246, 0.1);
}

.upload-content i {
    font-size: 1.5rem;
    color: #8b5cf6;
    margin-bottom: 8px;
}

.upload-content p {
    color: #e2e8f0;
    font-size: 0.85rem;
    margin: 8px 0 4px 0;
}

.upload-content small {
    color: #94a3b8;
    font-size: 0.75rem;
}

.file-preview {
    margin-top: 10px;
    padding: 10px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 6px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #86efac;
}

.file-info i {
    font-size: 1rem;
}

.file-info span {
    flex: 1;
    font-weight: 500;
    font-size: 0.8rem;
}

.remove-file {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 3px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.7rem;
}

.remove-file:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Success Modal Styles */
.success-modal {
    background: linear-gradient(135deg, #1a0a2e 0%, #16213e 100%);
    border: 2px solid #22c55e;
    box-shadow: 0 20px 60px rgba(34, 197, 94, 0.3);
    max-width: 500px;
    text-align: center;
}

.success-animation {
    padding: 40px 30px;
}

.success-icon {
    font-size: 4rem;
    color: #22c55e;
    margin-bottom: 20px;
    animation: successPulse 2s ease-out;
}

.success-animation h2 {
    color: #22c55e;
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.success-animation p {
    color: #e2e8f0;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.success-details {
    background: rgba(34, 197, 94, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 0;
}

.detail-item:last-child {
    margin-bottom: 0;
}

.detail-item .label {
    color: #94a3b8;
    font-weight: 500;
}

.detail-item .value {
    color: #22c55e;
    font-weight: 700;
    font-size: 1.1rem;
}


/* Payment Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #1a0a2e 0%, #16213e 100%);
    border-radius: 20px;
    border: 2px solid #8b5cf6;
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.3);
    animation: modalSlideIn 0.5s ease-out;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    max-width: 500px;
    width: 95%;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
}

.modal-header h2 {
    color: #8b5cf6;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: #8b5cf6;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #ec4899;
}

.modal-body {
    padding: 25px;
}

.payment-modal {
    max-width: 500px;
    width: 95%;
}

.payment-info {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.package-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.package-summary h3 {
    color: #ec4899;
    font-size: 1.3rem;
    font-weight: 600;
}

.package-price-display {
    text-align: right;
}

.package-price-display span {
    color: #8b5cf6;
    font-size: 1.5rem;
    font-weight: 700;
}

.package-price-display small {
    color: #9ca3af;
    font-size: 14px;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #10b981;
    font-size: 14px;
    font-weight: 500;
}

.security-badge i {
    font-size: 16px;
}

.payment-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.payment-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payment-form label {
    color: #8b5cf6;
    font-weight: 500;
    font-size: 14px;
}

.payment-form input {
    padding: 12px 15px;
    background: rgba(26, 10, 46, 0.7);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    color: #e5e7eb;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.payment-form input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    background: rgba(26, 10, 46, 0.8);
}

.payment-form input::placeholder {
    color: #9ca3af;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.card-input-group {
    position: relative;
}

.card-input-group input {
    padding-right: 80px;
}

.card-icons {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    color: #8b5cf6;
    font-size: 18px;
}

.payment-terms {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    color: #d1d5db;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8b5cf6;
    margin: 0;
}

.checkbox-label a {
    color: #8b5cf6;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

.payment-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.payment-btn {
    min-width: 180px;
}

/* 3D Secure Modal */
.secure-modal {
    max-width: 450px;
    width: 95%;
}

.secure-modal .modal-content {
    max-width: 450px;
    width: 95%;
}

.secure-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.bank-logo {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.bank-logo i {
    font-size: 2.5rem;
    color: #8b5cf6;
    margin-bottom: 10px;
}

.bank-logo span {
    color: #e5e7eb;
    font-weight: 600;
    font-size: 1.1rem;
}

.sms-section {
    text-align: center;
}

.sms-section h3 {
    color: #8b5cf6;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.sms-section p {
    color: #d1d5db;
    margin-bottom: 20px;
}

#maskedPhone {
    color: #ec4899;
    font-weight: 600;
}

.sms-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.sms-input-group input {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 15px;
    background: rgba(26, 10, 46, 0.7);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    color: #e5e7eb;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.sms-input-group input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
    background: rgba(26, 10, 46, 0.8);
}

.sms-timer {
    color: #9ca3af;
    font-size: 14px;
}

#smsTimer {
    color: #f59e0b;
    font-weight: 600;
}

.payment-summary {
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 10px;
    padding: 15px;
}

.payment-summary h4 {
    color: #8b5cf6;
    font-size: 1rem;
    margin-bottom: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #d1d5db;
    font-size: 14px;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    color: #e5e7eb;
    font-weight: 600;
}

.secure-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

/* Form Input Enhancements */
.payment-form input:valid {
    border-color: #10b981;
}

.payment-form input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

/* Card Number Formatting */
#cardNumber {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Expiry Date Formatting */
#expiryDate {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* CVV Input */
#cvv {
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* Loading States */
.payment-btn.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.payment-btn.loading i {
    animation: spin 1s linear infinite;
}

/* Success Animation */
.payment-success {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Error States */
.payment-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3) !important;
}

.error-message {
    color: #fca5a5;
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Button Styles */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(45deg, #8b5cf6, #ec4899);
    color: white;
    border: 2px solid transparent;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.btn-secondary:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: #8b5cf6;
}

.btn-outline {
    background: transparent;
    color: #8b5cf6;
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.btn-outline:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 98%;
        margin: 10px;
        max-width: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .payment-actions,
    .secure-actions {
        flex-direction: column;
    }
    
    .payment-btn {
        min-width: auto;
        width: 100%;
    }
    
    .sms-input-group {
        flex-direction: column;
    }
    
    /* IBAN responsive styles */
    .iban-payment-info {
        max-height: 70vh;
        padding: 10px;
    }
    
    .iban-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 6px 0;
    }
    
    .iban-item label {
        min-width: auto;
        margin-bottom: 3px;
        font-size: 0.8rem;
    }
    
    .iban-item span {
        text-align: left;
        margin-right: 0;
        margin-bottom: 8px;
        width: 100%;
        word-break: break-all;
        font-size: 0.75rem;
    }
    
    .iban-item .copy-btn {
        margin-left: 0;
        align-self: flex-end;
        padding: 3px 6px;
        font-size: 0.65rem;
    }
    
    .iban-instructions {
        padding: 10px;
    }
    
    .iban-instructions ol {
        padding-left: 12px;
    }
    
    .iban-instructions li {
        font-size: 0.75rem;
        margin-bottom: 3px;
    }
    
    .dekont-upload-section {
        margin: 10px 0;
        padding: 8px;
    }
    
    .upload-area {
        padding: 15px;
    }
    
    .upload-content i {
        font-size: 1.2rem;
    }
    
    .upload-content p {
        font-size: 0.8rem;
    }
    
    .upload-content small {
        font-size: 0.7rem;
    }
    
    .card-icons {
        right: 10px;
        font-size: 16px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

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

@media (max-width: 480px) {
    .package-summary {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .payment-info {
        padding: 15px;
    }
    
    .bank-logo {
        padding: 15px;
    }
    
    .bank-logo i {
        font-size: 2rem;
    }
}
