/**
 * ============================================
 * ✏️ ELITE EDIT TRANSACTION MODAL - FULL SCREEN REDESIGN V2
 * Apple-Inspired Premium Experience + Category Buttons
 * Layout Vertical | Botões Delicados | Scroll Invisível
 * ============================================
 */

/* ===================================
   FULL SCREEN OVERLAY
=================================== */

.elite-edit-overlay {
    position: fixed;
    inset: 0;
    z-index: 10200;

    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
                visibility 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Tema Escuro (padrão) - FULL BLACK */
.elite-edit-overlay {
    background: linear-gradient(135deg,
        rgba(0, 0, 0, 0.98) 0%,
        rgba(10, 10, 15, 0.98) 100%);
}

/* Tema Claro - FULL WHITE */
.elite-edit-overlay.light-theme {
    background: linear-gradient(135deg,
        rgba(250, 250, 252, 0.98) 0%,
        rgba(255, 255, 255, 0.98) 100%);
}

.elite-edit-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

/* Close Button (Top Right) */
.elite-edit-close {
    position: absolute;
    top: 40px;
    right: 40px;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #F5F5F7;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.elite-edit-overlay.light-theme .elite-edit-close {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
    color: #1D1D1F;
}

.elite-edit-close:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
    color: #6366f1;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
}

.elite-edit-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* ===================================
   MAIN CONTENT CONTAINER - FULL SCREEN COM SCROLL INVISÍVEL
=================================== */

.elite-edit-content {
    width: 100%;
    height: 100%;
    padding: 60px 80px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;

    animation: elite-edit-fade-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow-y: auto;
    overflow-x: hidden;

    /* SCROLL INVISÍVEL */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

/* Esconder scrollbar no Chrome/Safari/Opera */
.elite-edit-content::-webkit-scrollbar {
    display: none;
}

@keyframes elite-edit-fade-in {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Glow Effect Decorativo (Sutil) */
.elite-edit-content::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    animation: elite-edit-glow-pulse 6s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.elite-edit-overlay.light-theme .elite-edit-content::before {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
}

@keyframes elite-edit-glow-pulse {
    0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* ===================================
   HEADER SECTION
=================================== */

.elite-edit-header {
    text-align: center;
    z-index: 1;
}

.elite-edit-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #fff;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);

    animation: elite-edit-icon-float 3s ease-in-out infinite;
}

@keyframes elite-edit-icon-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.elite-edit-title {
    font-size: 2rem;
    font-weight: 700;
    color: #F5F5F7;
    margin: 0;
    letter-spacing: -0.5px;
}

.elite-edit-overlay.light-theme .elite-edit-title {
    color: #1D1D1F;
}

/* ===================================
   FORM LAYOUT - VERTICAL (Campos em cima, Categorias embaixo)
=================================== */

.elite-edit-form {
    width: 100%;
    max-width: 550px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    z-index: 1;
}

/* Input Fields Section - UM EMBAIXO DO OUTRO */
.elite-edit-form-left {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Category Section */
.elite-edit-form-right {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ===================================
   INPUT FIELDS (Top)
=================================== */

.elite-edit-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.elite-edit-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(245, 245, 247, 0.7);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.elite-edit-overlay.light-theme .elite-edit-label {
    color: rgba(29, 29, 31, 0.6);
}

.elite-edit-label i {
    font-size: 0.875rem;
    color: #6366f1;
}

.elite-edit-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #F5F5F7;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.elite-edit-overlay.light-theme .elite-edit-input {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1D1D1F;
}

.elite-edit-input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15),
                0 8px 24px rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.elite-edit-overlay.light-theme .elite-edit-input:focus {
    background: rgba(99, 102, 241, 0.06);
}

.elite-edit-input::placeholder {
    color: rgba(245, 245, 247, 0.3);
}

.elite-edit-overlay.light-theme .elite-edit-input::placeholder {
    color: rgba(29, 29, 31, 0.3);
}

/* ===================================
   CATEGORY SECTION (Bottom) - BOTÕES MENORES E DELICADOS
=================================== */

.elite-edit-category-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.elite-edit-category-header {
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(245, 245, 247, 0.7);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.elite-edit-overlay.light-theme .elite-edit-category-header {
    color: rgba(29, 29, 31, 0.6);
}

.elite-edit-category-header i {
    font-size: 0.875rem;
    color: #6366f1;
}

/* Category Grid - 3 colunas (delicado e organizado) */
.elite-edit-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* Category Button - METADE DO TAMANHO (Delicado) */
.elite-category-btn {
    padding: 12px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;

    position: relative;
    overflow: hidden;
}

.elite-edit-overlay.light-theme .elite-category-btn {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

.elite-category-btn i {
    font-size: 1.25rem;
    color: rgba(245, 245, 247, 0.6);
    transition: all 0.3s ease;
}

.elite-edit-overlay.light-theme .elite-category-btn i {
    color: rgba(29, 29, 31, 0.5);
}

.elite-category-btn span {
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(245, 245, 247, 0.7);
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.2;
}

.elite-edit-overlay.light-theme .elite-category-btn span {
    color: rgba(29, 29, 31, 0.6);
}

/* Hover State */
.elite-category-btn:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.elite-category-btn:hover i,
.elite-category-btn:hover span {
    color: #6366f1;
}

/* Selected State - DESTAQUE MÁXIMO */
.elite-category-btn.selected {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2),
                0 8px 24px rgba(99, 102, 241, 0.5);
    transform: translateY(-3px) scale(1.05);
}

.elite-category-btn.selected i,
.elite-category-btn.selected span {
    color: #ffffff;
}

/* Glow effect no botão selecionado */
.elite-category-btn.selected::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.6), rgba(79, 70, 229, 0.6));
    border-radius: 12px;
    z-index: -1;
    opacity: 0.6;
    animation: elite-category-glow 2s ease-in-out infinite;
}

@keyframes elite-category-glow {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

/* Active State */
.elite-category-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* ===================================
   ACTION BUTTONS (Bottom)
=================================== */

.elite-edit-actions {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 450px;
    z-index: 1;
}

.elite-edit-btn {
    flex: 1;
    padding: 16px 36px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: none;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    position: relative;
    overflow: hidden;
}

/* Botão CANCELAR */
.elite-edit-btn-cancel {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #F5F5F7;
}

.elite-edit-overlay.light-theme .elite-edit-btn-cancel {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
    color: #1D1D1F;
}

.elite-edit-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

.elite-edit-overlay.light-theme .elite-edit-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15);
}

/* Botão SALVAR */
.elite-edit-btn-save {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: 2px solid #6366f1;
    color: #fff;
    box-shadow: 0 10px 28px rgba(99, 102, 241, 0.4);
}

.elite-edit-btn-save:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 36px rgba(99, 102, 241, 0.6);
}

.elite-edit-btn-save:active {
    transform: translateY(-1px) scale(0.98);
}

/* Glow effect no botão salvar */
.elite-edit-btn-save::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(79, 70, 229, 0.5));
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.elite-edit-btn-save:hover::before {
    opacity: 1;
    animation: elite-save-glow-pulse 1.5s ease-in-out infinite;
}

@keyframes elite-save-glow-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ===================================
   RESPONSIVE - TABLET
=================================== */

@media (max-width: 1200px) {
    .elite-edit-content {
        padding: 50px 50px;
        gap: 28px;
    }

    .elite-edit-form {
        max-width: 500px;
    }
}

/* ===================================
   RESPONSIVE - MOBILE
=================================== */

@media (max-width: 768px) {
    .elite-edit-content {
        padding: 80px 20px 40px;
        gap: 24px;
        justify-content: flex-start;
    }

    .elite-edit-close {
        top: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
        font-size: 1.125rem;
    }

    .elite-edit-icon {
        width: 56px;
        height: 56px;
        font-size: 1.625rem;
        margin-bottom: 12px;
    }

    .elite-edit-title {
        font-size: 1.625rem;
    }

    .elite-edit-form {
        max-width: 100%;
        gap: 24px;
    }

    .elite-edit-form-left {
        gap: 16px;
    }

    .elite-edit-input {
        padding: 14px 18px;
        font-size: 0.9375rem;
    }

    .elite-edit-category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .elite-category-btn {
        padding: 10px 8px;
    }

    .elite-category-btn i {
        font-size: 1.125rem;
    }

    .elite-category-btn span {
        font-size: 0.625rem;
    }

    .elite-edit-actions {
        flex-direction: column;
        max-width: 100%;
        gap: 12px;
    }

    .elite-edit-btn {
        width: 100%;
        padding: 15px 32px;
    }
}

@media (max-width: 480px) {
    .elite-edit-content {
        padding: 70px 16px 32px;
        gap: 20px;
    }

    .elite-edit-icon {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }

    .elite-edit-title {
        font-size: 1.5rem;
    }

    .elite-edit-form {
        gap: 20px;
    }

    .elite-edit-form-left {
        gap: 14px;
    }

    .elite-edit-category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .elite-category-btn {
        padding: 8px 6px;
    }

    .elite-category-btn i {
        font-size: 1rem;
    }

    .elite-category-btn span {
        font-size: 0.5625rem;
    }
}
