/* ============================================
   MODALES DE CLIENTE - ESTILOS
   ============================================ */

/* Overlay del modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

/* Contenedor del modal */
.modal-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    position: relative;
    border: 1px solid #e2e8f0;
}

/* Header del modal */
.modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    color: white;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Body del modal */
.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
    color: #333333;
    background: #ffffff;
}

/* Scroll personalizado */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Campos de información */
.info-field {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #F4B400;
    border: 1px solid #e2e8f0;
}

.info-label {
    font-size: 12px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-label i {
    color: #F4B400;
}

.info-value {
    font-size: 16px;
    color: #1a202c;
    font-weight: 600;
}

/* Galería de fotos */
.photo-gallery {
    margin-top: 25px;
}

.gallery-title {
    font-size: 14px;
    color: #333333;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gallery-title i {
    color: #F4B400;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #e2e8f0;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 2px solid #e2e8f0;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay i {
    color: white;
    font-size: 24px;
}

.no-photos {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 12px;
}

/* Footer del modal */
.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    background: #f8f9fa;
}

.btn-modal {
    padding: 12px 30px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-modal-primary {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    color: white;
}

.btn-modal-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.4);
}

.btn-modal-secondary {
    background: #e2e8f0;
    color: #333333;
}

.btn-modal-secondary:hover {
    background: #cbd5e1;
}

/* Formulario de edición */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 12px;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: #1a202c;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #003366;
    background: #ffffff;
}

.form-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #edf2f7;
}

.form-input::placeholder {
    color: #94a3b8;
}

/* Upload de fotos */
.photo-upload {
    margin-top: 20px;
}

.upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-area:hover {
    border-color: #003366;
    background: #e8f4ff;
}

.upload-icon {
    font-size: 48px;
    color: #94a3b8;
    margin-bottom: 10px;
}

.upload-text {
    color: #64748b;
    font-size: 14px;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-body {
        padding: 20px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   LIGHTBOX - Visor de Imágenes Ampliado
   ============================================ */

.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-image {
    max-width: 90%;
    max-height: 75%;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-download {
    margin-top: 20px;
    padding: 12px 30px;
    background: #F4B400;
    color: #003366;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.lightbox-download:hover {
    background: #ffca28;
    transform: scale(1.05);
}

/* Botón descarga en miniatura */
.gallery-item .btn-download-thumb {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: #F4B400;
    color: #003366;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-item:hover .btn-download-thumb {
    opacity: 1;
}

.gallery-item .btn-download-thumb:hover {
    background: #ffca28;
    transform: scale(1.1);
}

/* ============================================
   MODAL DE ELIMINACIÓN - Estilos Especiales
   ============================================ */

/* Modal más pequeño */
.modal-small {
    max-width: 420px;
}

/* Header en rojo para peligro */
.modal-header-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Icono de advertencia grande */
.delete-warning-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    background: #fee2e2;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-warning-icon i {
    font-size: 36px;
    color: #dc2626;
}

/* Icono de candado */
.delete-lock-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px auto;
    background: #fef3c7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-lock-icon i {
    font-size: 36px;
    color: #d97706;
}

/* Botón de peligro (rojo) */
.btn-modal-danger {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.btn-modal-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 38, 38, 0.4);
}

/* Animación de shake para error */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s ease;
}

/* ============================================
   PAYMENT MODAL (NEW DESIGN)
   ============================================ */

.pm-modal-content {
    background-color: #ffffff;
    width: 100%;
    max-width: 480px;
    border-radius: 1rem;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    border: 1px solid #f3f4f6;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pm-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #9ca3af;
    background: transparent;
    border: none;
    padding: 0.25rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s;
}

.pm-close-btn:hover {
    color: #4b5563;
    background-color: #f3f4f6;
}

.pm-header {
    padding: 2rem 2rem 1rem 2rem;
    text-align: center;
}

.pm-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.5rem;
    line-height: 1.25;
}

.pm-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.pm-amount {
    font-size: 1.875rem;
    font-weight: 800;
    color: #1e3a8a;
    letter-spacing: -0.025em;
}

.pm-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.pm-banks-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pm-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-align: center;
}

.pm-bank-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0.75rem;
    transition: box-shadow 0.2s;
    border-left-width: 4px;
    border-left-style: solid;
}

.pm-bank-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.pm-bank-info {
    flex: 1;
}

.pm-bank-name {
    font-size: 0.875rem;
    font-weight: 700;
    margin: 0;
}

.pm-bank-account {
    font-size: 1rem;
    font-family: monospace;
    font-weight: 600;
    color: #1f2937;
    margin: 0.125rem 0;
}

.pm-bank-beneficiary {
    font-size: 0.625rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
}

.pm-bank-beneficiary span {
    font-weight: 500;
}

.pm-copy-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    transition: color 0.2s;
}

/* SCOTIABANK */
.pm-bank-red {
    background-color: rgba(254, 226, 226, 0.5);
    border-left-color: #ef4444;
}

.pm-bank-red .pm-bank-name {
    color: #dc2626;
}

.pm-copy-red {
    color: #f87171;
}

.pm-copy-red:hover {
    color: #dc2626;
}

/* INTERBANK */
.pm-bank-green {
    background-color: rgba(209, 250, 229, 0.5);
    border-left-color: #10b981;
}

.pm-bank-green .pm-bank-name {
    color: #059669;
}

.pm-copy-green {
    color: #10b981;
}

.pm-copy-green:hover {
    color: #047857;
}

/* PLIN */
.pm-bank-blue {
    background-color: rgba(224, 242, 254, 0.5);
    border-left-color: #38bdf8;
}

.pm-bank-blue .pm-bank-name {
    color: #0ea5e9;
}

.pm-copy-blue {
    color: #38bdf8;
}

.pm-copy-blue:hover {
    color: #0284c7;
}

/* Upload Section */
.pm-upload-section {
    width: 100%;
    margin-top: 1rem;
    padding-bottom: 1.5rem;
}

.pm-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 8rem;
    border: 2px dashed #d1d5db;
    border-radius: 0.75rem;
    cursor: pointer;
    background-color: #f9fafb;
    transition: background-color 0.2s;
    box-sizing: border-box;
}

.pm-upload-area:hover {
    background-color: #f3f4f6;
}

.pm-upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    text-align: center;
}

.pm-upload-icon-wrapper {
    padding: 0.5rem;
    background-color: #eff6ff;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
    transition: transform 0.2s;
}

.pm-upload-icon-wrapper span {
    color: #3b82f6;
    font-size: 1.5rem;
}

.pm-upload-area:hover .pm-upload-icon-wrapper {
    transform: scale(1.1);
}

.pm-upload-text {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    margin: 0;
}

.pm-upload-text span {
    font-weight: 600;
    color: #2563eb;
}

.pm-upload-hint {
    font-size: 0.625rem;
    color: #9ca3af;
    margin: 0.25rem 0 0 0;
}

.pm-preview-img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 0.5rem;
    margin: 0 auto 0.9375rem auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: block;
}

.pm-remove-image-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ef4444;
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 10;
}

.pm-remove-image-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.pm-remove-image-btn span {
    font-size: 16px;
}

.pm-preview-question {
    font-weight: 700;
    margin-bottom: 0.9375rem;
    font-size: 1rem;
    color: #1f2937;
}

.pm-btn-primary {
    width: 100%;
    background-color: #10b981;
    color: #ffffff;
    font-weight: 700;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: all 0.2s;
}

.pm-btn-primary:hover {
    background-color: #059669;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

.pm-btn-link {
    font-size: 0.875rem;
    color: #6b7280;
    background: transparent;
    border: none;
    text-decoration: underline;
    margin-top: 0.75rem;
    width: 100%;
    cursor: pointer;
    transition: color 0.2s;
}

.pm-btn-link:hover {
    color: #1f2937;
}

.pm-loading-icon {
    font-size: 1.875rem;
    color: #1e3a8a;
    margin-bottom: 0.625rem;
}

.pm-loading-text {
    font-weight: 700;
    color: #6b7280;
    margin: 0;
}