/* Custom Popup Overlay */
.custom-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Custom Popup Base */
.custom-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    max-width: 90%;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.custom-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.popup-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.popup-close-btn:hover {
    background: #ffffff;
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.popup-close-btn i {
    color: #1f2937;
    font-size: 16px;
}

/* Premium Bank Accounts Popup */
.custom-popup-premium {
    max-width: 900px;
    width: 100%;
}

.popup-premium-header {
    position: relative;
    padding: 30px 30px 25px;
    background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
    overflow: hidden;
    text-align: center;
}

.premium-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.premium-header-content {
    position: relative;
    z-index: 2;
}

.premium-icon-wrapper {
    width: 60px;
    height: 60px;
    margin: 0 auto 0px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.premium-icon-wrapper i {
    font-size: 28px;
    color: #ffffff;
}

.premium-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 6px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.3px;
}

.premium-subtitle {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-weight: 400;
}

.popup-premium-body {
    padding: 16px;
    background: #f9fafb;
    overflow-y: auto;
    flex: 1;
}

.bank-accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.bank-card-premium {
    background: #ffffff;
    border-radius: 10px;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
    position: relative;
    padding: 12px;
}

.bank-card-premium:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border-color: #DC2626;
}

.bank-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f3f4f6;
}

.bank-logo-wrapper {
    width: 32px;
    height: 32px;
    background: #DC2626;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bank-logo-wrapper i {
    font-size: 14px;
    color: #ffffff;
}

.bank-info {
    flex: 1;
    min-width: 0;
    margin-left: 8px;
}

.bank-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 4px;
    line-height: 1.3;
}

.bank-account-name {
    font-size: 0.65rem;
    color: #6b7280;
    margin: 0 0 2px;
    line-height: 1.3;
}

.bank-account-name strong {
    font-weight: 600;
    color: #4b5563;
}

.bank-branch {
    font-size: 0.7rem;
    color: #9ca3af;
    margin: 0;
    font-weight: 400;
    line-height: 1.3;
}

.bank-card-body {
    position: relative;
    padding-top: 0;
}

.account-detail-item {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.account-detail-item:last-of-type {
    margin-bottom: 0;
}

.detail-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.detail-label i {
    font-size: 9px;
}

.detail-value {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1f2937;
    text-align: right;
}

.branch-code {
    font-family: 'Courier New', 'Monaco', monospace;
    color: #DC2626;
}

.account-number {
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 0.75rem;
    color: #DC2626;
    letter-spacing: 0.5px;
}

.iban-item {
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid #f3f4f6;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.iban-copy-wrapper {
    display: flex;
    gap: 6px;
    align-items: stretch;
}

.iban-display-text {
    flex: 1;
    font-family: 'Courier New', 'Monaco', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 8px;
    color: #DC2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    word-break: break-all;
    line-height: 1.4;
    letter-spacing: 0.5px;
}

.iban-copy-btn {
    padding: 6px 10px;
    background: #DC2626;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.iban-copy-btn:hover {
    background: #b91c1c;
}

.iban-copy-btn i {
    font-size: 10px;
}

.iban-copy-btn:active {
    transform: scale(0.98);
}

.currency-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 4px 8px;
    background: #DC2626;
    color: #ffffff;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.65rem;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.currency-badge.currency-usd {
    background: #10b981;
}

.currency-badge.currency-eur {
    background: #3b82f6;
}

.iban-copy-btn.copied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.iban-copy-btn.copied i {
    animation: checkmark 0.5s ease;
}

.iban-copy-btn.copied .copy-text {
    display: none;
}

.iban-copy-btn.copied::after {
    content: 'Kopyalandı!';
}

@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}



.premium-close-btn:active {
    transform: translateY(0);
}

/* General Popup Styles */
.popup-header {
    padding: 24px 30px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.popup-body {
    padding: 30px;
    background: #ffffff;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 200px);
}

.popup-body::-webkit-scrollbar {
    width: 6px;
}

.popup-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.popup-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.popup-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.popup-content {
    line-height: 1.8;
    color: #4b5563;
    font-size: 1rem;
}

.popup-text-content {
    line-height: 1.7;
    color: #1F2937;
    font-size: 0.95rem;
}

.popup-image-content {
    text-align: center;
    max-height: 60vh;
    overflow: auto;
}

.popup-image-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

.popup-video-content {
    text-align: center;
    max-height: 60vh;
    overflow: auto;
}

.popup-video-content iframe {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.popup-footer {
    padding: 20px 30px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    text-align: right;
}

.popup-close-button {
    padding: 10px 24px;
    background: #6b7280;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-close-button:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .custom-popup {
        max-width: 95%;
        max-height: 95vh;
        border-radius: 16px;
    }

    .custom-popup-premium {
        max-width: 100%;
    }

    .popup-premium-header {
        padding: 24px 20px 20px;
    }

    .premium-icon-wrapper {
        width: 50px;
        height: 50px;
    }

    .premium-icon-wrapper i {
        font-size: 24px;
    }

    .premium-title {
        font-size: 1.3rem;
    }

    .premium-subtitle {
        font-size: 0.85rem;
    }

    .popup-premium-body {
        padding: 16px;
    }

    .bank-accounts-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bank-card-header {
        padding: 14px;
    }

    .bank-card-body {
        padding: 14px;
    }

    .currency-badge {
        top: 4px;
        right: 4px;
        font-size: 0.6rem;
        padding: 3px 6px;
    }

    .iban-copy-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .iban-display-text {
        min-width: 100%;
        font-size: 1rem;
        padding: 10px 0;
    }

    .iban-copy-btn {
        width: 100%;
        justify-content: center;
    }

    .popup-header {
        padding: 16px 20px;
    }

    .popup-title {
        font-size: 1.2rem;
    }

    .popup-body {
        padding: 20px;
        max-height: calc(90vh - 180px);
        overflow-y: auto;
    }

    .popup-image-content {
        max-height: 50vh;
    }

    .popup-image-content img {
        width: 100%;
        height: auto;
    }

    .popup-video-content {
        max-height: 50vh;
    }

    .popup-video-content iframe {
        min-height: 250px;
    }

    .popup-content {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .popup-footer {
        padding: 14px 20px;
        text-align: center;
    }

    .popup-close-button {
        width: 100%;
        padding: 12px;
        font-size: 0.9rem;
    }

}

/* Animation */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.custom-popup.active {
    animation: popupFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
