/* Model Dialog Custom Styles - Enhanced Attractive Design */
/* Uncomment the CSS link in admin.blade.php to enable these styles */
/* Comment the CSS link to use the default styles from style.css */

/* Modal Backdrop - Enhanced */
.modal.fade.add-new-upi-modal .modal-backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
}

.modal.fade.add-new-upi-modal.show .modal-backdrop {
    animation: fadeInBackdrop 0.3s ease-out;
}

@keyframes fadeInBackdrop {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Container */
.modal.fade.add-new-upi-modal {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal.fade.add-new-upi-modal#send-to-payout-modal {
    z-index: 1055;
}

.modal.fade.add-new-upi-modal.show .modal-dialog {
    animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

/* Modal Dialog */
.add-new-upi-modal .modal-dialog {
    /* max-width: 550px; */
    margin: 1.75rem auto;
    position: relative;
}

.add-new-upi-modal .modal-dialog-centered {
    display: flex;
    align-items: center;
    min-height: calc(100% - 3.5rem);
}

/* Modal Content - Enhanced with Glassmorphism */
.add-new-upi-modal .modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(12, 53, 119, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset,
                0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    background: #FFFFFF;
    position: relative;
    transform: translateZ(0);
}

.add-new-upi-modal .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #0C3577 0%, 
        #1a4a9e 25%, 
        #2d5fc4 50%, 
        #1a4a9e 75%, 
        #0C3577 100%);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Modal Header - Premium Gradient */
.add-new-upi-modal .modal-header {
    background: linear-gradient(135deg, 
        #0C3577 0%, 
        #1a4a9e 30%, 
        #2d5fc4 60%, 
        #1a4a9e 100%);
    border-radius: 0;
    padding: 25px 35px;
    border-bottom: none;
    position: relative;
    overflow: hidden;
}

.add-new-upi-modal .modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

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

.add-new-upi-modal .modal-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
}

/* Modal Title - Enhanced Typography */
.add-new-upi-modal .modal-title {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 24px;
    margin: 0;
    text-transform: capitalize;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.add-new-upi-modal .modal-title figure {
    margin: 0 15px 0 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.add-new-upi-modal .modal-title figure:hover {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255, 255, 255, 0.25);
}

.add-new-upi-modal .modal-title figure img {
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
    transition: transform 0.3s ease;
}

/* Close Button - Premium Design */
.add-new-upi-modal .modal-header .btn-close {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    opacity: 1;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.add-new-upi-modal .modal-header .btn-close i {
    color: #FFFFFF;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.add-new-upi-modal .modal-header .btn-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.add-new-upi-modal .modal-header .btn-close:active {
    transform: rotate(90deg) scale(0.95);
}

.add-new-upi-modal .modal-header .btn-close:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.3),
                0 4px 15px rgba(0, 0, 0, 0.1);
    outline: none;
}

/* Modal Body - Enhanced Spacing */
.add-new-upi-modal .modal-body {
    padding: 40px 35px;
    background: linear-gradient(to bottom, #FFFFFF 0%, #FAFBFC 100%);
    position: relative;
}

/* Form Group - Enhanced */
.add-new-upi-modal .modal-body .form-group {
    margin: 0 0 28px;
    position: relative;
}

.add-new-upi-modal .modal-body .form-group:last-of-type {
    margin-bottom: 0px;
}

/* Labels - Modern Design */
.add-new-upi-modal .modal-body .form-group label {
    font-weight: 600;
    font-size: 14px;
    line-height: 140%;
    color: #2C3E50;
    margin-bottom: 10px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 5px;
}

.add-new-upi-modal .modal-body .form-group label::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #0C3577 0%, transparent 100%);
    border-radius: 2px;
}

/* Merchant Type Image Radios */
.add-new-upi-modal .modal-body .merchant-type-selector {
    align-items: center;
    margin-bottom: 32px;
    gap: 14px !important;
}

.add-new-upi-modal .modal-body .merchant-type-option {
    position: relative;
    flex: 0 0 calc(16.66% - 12px);
    min-width: 150px;
}

.add-new-upi-modal .modal-body .merchant-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.add-new-upi-modal .modal-body .merchant-type-label {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    min-height: 96px;
    width: 100%;
    margin-bottom: 0;
    padding: 12px 12px 10px;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
    cursor: pointer;
    border: 2px solid #E6ECF5;
    border-radius: 18px;
    background: linear-gradient(180deg, #FFFFFF 0%, #F7FAFF 100%);
    box-shadow: 0 10px 25px rgba(12, 53, 119, 0.08);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.add-new-upi-modal .modal-body .merchant-type-label::before {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #B8C6DB;
    background: #FFFFFF;
    box-shadow: inset 0 0 0 4px #FFFFFF;
    transition: all 0.25s ease;
}

.add-new-upi-modal .modal-body .merchant-type-label:hover {
    border-color: #9AB0D5;
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(12, 53, 119, 0.14);
}

.add-new-upi-modal .modal-body .merchant-type-label::after {
    display: none;
}

.add-new-upi-modal .modal-body .merchant-type-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
}

.add-new-upi-modal .modal-body .merchant-type-label img {
    display: block;
    height: auto;
    max-height: 34px;
    width: auto;
    max-width: 100px;
}

.add-new-upi-modal .modal-body .merchant-type-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: #41556F;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.add-new-upi-modal .modal-body .merchant-type-option input[type="radio"]:checked + .merchant-type-label {
    border-color: #2D5FC4;
    background: linear-gradient(180deg, #FFFFFF 0%, #EEF4FF 100%);
    box-shadow: 0 16px 34px rgba(45, 95, 196, 0.22);
}

.add-new-upi-modal .modal-body .merchant-type-option input[type="radio"]:checked + .merchant-type-label::before {
    border-color: #2D5FC4;
    background: #2D5FC4;
    box-shadow: inset 0 0 0 4px #FFFFFF;
}

.add-new-upi-modal .modal-body .merchant-type-option input[type="radio"]:checked + .merchant-type-label .merchant-type-name {
    color: #0C3577;
}

.add-new-upi-modal .modal-body .merchant-type-option input[type="radio"]:focus + .merchant-type-label {
    box-shadow: 0 0 0 4px rgba(45, 95, 196, 0.14),
                0 16px 34px rgba(45, 95, 196, 0.18);
}

/* Form Controls - Premium Input Design */
.add-new-upi-modal .modal-body .form-group .form-control {
    background: #FFFFFF;
    border: 2px solid #E8ECEF;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 15px;
    color: #2C3E50;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
}

.add-new-upi-modal .modal-body .form-group .form-control:hover {
    border-color: #0C3577;
    box-shadow: 0 4px 12px rgba(12, 53, 119, 0.1);
    transform: translateY(-1px);
}

.add-new-upi-modal .modal-body .form-group .form-control:focus {
    background: #FFFFFF;
    border-color: #0C3577;
    box-shadow: 0 0 0 4px rgba(12, 53, 119, 0.1),
                0 4px 16px rgba(12, 53, 119, 0.15);
    outline: none;
    transform: translateY(-2px);
}

.add-new-upi-modal .modal-body .form-group .form-control::placeholder {
    color: #95A5A6;
    opacity: 0.8;
    font-weight: 400;
}

/* Select Dropdown - Enhanced */
.add-new-upi-modal .modal-body .form-group select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%230C3577' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
    background-color: #FFFFFF;
}

/* Alert Messages - Modern Design */
.add-new-upi-modal #send-to-payout-error,
.add-new-upi-modal #send-to-payout-success {
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 25px;
    font-size: 14px;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.add-new-upi-modal #send-to-payout-error {
    background: linear-gradient(135deg, #FFF5F5 0%, #FFEBEB 100%);
    color: #DC3545;
    border-left: 4px solid #DC3545;
}

.add-new-upi-modal #send-to-payout-success {
    background: linear-gradient(135deg, #F0FFF4 0%, #E6FFED 100%);
    color: #28A745;
    border-left: 4px solid #28A745;
}

/* Buttons - Premium Design */
.add-new-upi-modal .modal-body .d-flex.gap-2 {
    gap: 15px !important;
    margin-top: 10px;
}

.add-new-upi-modal .modal-body .btn-main {
    padding: 14px 30px;
    border-radius: 0;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.add-new-upi-modal .modal-body .btn-main::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.add-new-upi-modal .modal-body .btn-main:hover::before {
    width: 300px;
    height: 300px;
}

.add-new-upi-modal .modal-body .btn-main span,
.add-new-upi-modal .modal-body .btn-main {
    position: relative;
    z-index: 1;
}

/* Cancel Button */
.add-new-upi-modal .modal-body .btn-main[data-bs-dismiss="modal"] {
    background: linear-gradient(135deg, #6C757D 0%, #5A6268 100%);
    color: #FFFFFF;
}

.add-new-upi-modal .modal-body .btn-main[data-bs-dismiss="modal"]:hover {
    background: linear-gradient(135deg, #5A6268 0%, #495057 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

/* Submit Button */
.add-new-upi-modal .modal-body .btn-main[type="submit"] {
    background: linear-gradient(135deg, #0C3577 0%, #1a4a9e 50%, #2d5fc4 100%);
    background-size: 200% 100%;
    color: #FFFFFF;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.add-new-upi-modal .modal-body .btn-main[type="submit"]:hover {
    background: linear-gradient(135deg, #0a2d63 0%, #16408a 50%, #2655b0 100%);
    background-size: 200% 100%;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(12, 53, 119, 0.4);
}

.add-new-upi-modal .modal-body .btn-main:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Merchant Setup Video Card */
.add-new-upi-modal .modal-body .merchant-type-video-wrap {
    margin-top: 18px;
}

.add-new-upi-modal .modal-body .merchant-type-video-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border-radius: 18px;
    text-decoration: none;
    overflow: hidden;
    border: 1px solid rgba(45, 95, 196, 0.18);
    background: linear-gradient(135deg, #f8fbff 0%, #eef4ff 45%, #ffffff 100%);
    box-shadow: 0 12px 28px rgba(24, 62, 128, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.add-new-upi-modal .modal-body .merchant-type-video-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.55) 48%,
        rgba(255, 255, 255, 0) 100%);
    transform: translateX(-130%);
    transition: transform 0.55s ease;
    pointer-events: none;
}

.add-new-upi-modal .modal-body .merchant-type-video-link:hover {
    transform: translateY(-3px);
    border-color: rgba(45, 95, 196, 0.34);
    box-shadow: 0 18px 36px rgba(24, 62, 128, 0.18);
}

.add-new-upi-modal .modal-body .merchant-type-video-link:hover::before {
    transform: translateX(130%);
}

.add-new-upi-modal .modal-body .merchant-type-video-icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #0C3577 0%, #2D5FC4 100%);
    color: #FFFFFF;
    font-size: 22px;
    box-shadow: 0 10px 22px rgba(12, 53, 119, 0.24);
    transition: transform 0.25s ease;
}

.add-new-upi-modal .modal-body .merchant-type-video-link:hover .merchant-type-video-icon {
    transform: scale(1.06) rotate(-4deg);
}

.add-new-upi-modal .modal-body .merchant-type-video-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    text-align: left;
}

.add-new-upi-modal .modal-body .merchant-type-video-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6A84B4;
}

.add-new-upi-modal .modal-body .merchant-type-video-title {
    font-size: 15px;
    line-height: 1.35;
    font-weight: 700;
    color: #15345E;
}

.add-new-upi-modal .modal-body .merchant-type-video-subtitle {
    font-size: 12px;
    line-height: 1.4;
    color: #70839E;
}

.add-new-upi-modal .modal-body .merchant-type-video-arrow {
    position: relative;
    z-index: 1;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(45, 95, 196, 0.1);
    color: #2D5FC4;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.add-new-upi-modal .modal-body .merchant-type-video-link:hover .merchant-type-video-arrow {
    transform: translateX(4px);
    background: rgba(45, 95, 196, 0.16);
}

/* Form */
.add-new-upi-modal #send-to-payout-form {
    width: 100%;
}

/* Loading State for Form */
.add-new-upi-modal #send-to-payout-form.loading {
    pointer-events: none;
    opacity: 0.7;
}

.add-new-upi-modal #send-to-payout-form.loading .btn-main[type="submit"] {
    position: relative;
    color: transparent;
}

.add-new-upi-modal #send-to-payout-form.loading .btn-main[type="submit"]::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #FFFFFF;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive Design - Enhanced */
@media (max-width: 576px) {
    .add-new-upi-modal .modal-dialog {
        max-width: 95%;
        margin: 1rem auto;
    }

    .add-new-upi-modal .modal-header {
        padding: 20px 25px;
    }

    .add-new-upi-modal .modal-title {
        font-size: 20px;
    }

    .add-new-upi-modal .modal-title figure {
        width: 40px;
        height: 40px;
        margin: 0 12px 0 0;
        padding: 8px;
    }

    .add-new-upi-modal .modal-body {
        padding: 30px 25px;
    }

    .add-new-upi-modal .modal-body .form-group {
        margin: 0 0 22px;
    }

    .add-new-upi-modal .modal-body .btn-main {
        padding: 12px 20px;
        font-size: 14px;
    }

    .add-new-upi-modal .modal-body .merchant-type-video-link {
        padding: 14px 15px;
        gap: 12px;
    }

    .add-new-upi-modal .modal-body .merchant-type-video-icon {
        width: 46px;
        height: 46px;
        font-size: 19px;
    }

    .add-new-upi-modal .modal-body .merchant-type-video-title {
        font-size: 14px;
    }
}

/* Tablet Responsive */
@media (min-width: 577px) and (max-width: 768px) {
    .add-new-upi-modal .modal-dialog {
        max-width: 90%;
    }
}

/* Smooth Scrollbar for Select */
.add-new-upi-modal .modal-body .form-group select.form-control::-webkit-scrollbar {
    width: 8px;
}

.add-new-upi-modal .modal-body .form-group select.form-control::-webkit-scrollbar-track {
    background: #F1F1F1;
    border-radius: 10px;
}

.add-new-upi-modal .modal-body .form-group select.form-control::-webkit-scrollbar-thumb {
    background: #0C3577;
    border-radius: 10px;
}

.add-new-upi-modal .modal-body .form-group select.form-control::-webkit-scrollbar-thumb:hover {
    background: #0a2d63;
}
