/* css/modal_orcamento.css */

/* Overlay do Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 0.5rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* Card do Modal */
.modal-card {
    background-color: #1A1A1A;
    width: 100%;
    max-width: 672px;
    /* max-w-2xl */
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid #1f2937;
    /* gray-800 */
    position: relative;
    padding: 0.75rem 1.5rem;
    max-height: 98vh;
    overflow-y: auto;
}

@media (min-width: 640px) {
    .modal-card {
        padding: 1rem 1.5rem;
    }
}

/* Scrollbar Customizada */
.modal-card::-webkit-scrollbar {
    width: 8px;
}

.modal-card::-webkit-scrollbar-track {
    background: #1A1A1A;
}

.modal-card::-webkit-scrollbar-thumb {
    background: #4B5563;
    border-radius: 4px;
}

.modal-card::-webkit-scrollbar-thumb:hover {
    background: #E51D24;
}

/* Botão Fechar */
.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #6B7280;
    cursor: pointer;
    transition: color 0.2s;
}

@media (min-width: 640px) {
    .modal-close-btn {
        top: 1.5rem;
        right: 1.5rem;
    }
}

.modal-close-btn:hover {
    color: #E51D24;
}

.modal-close-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

@media (min-width: 640px) {
    .modal-close-btn svg {
        width: 2rem;
        height: 2rem;
    }
}

/* Tipografia e Títulos */
.modal-resitank-title {
    font-family: 'Oswald', sans-serif;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    text-align: center;
    margin-top: 0;
}

.modal-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.modal-logo-icon {
    height: 2.5rem;
    width: auto;
    color: #E51D24;
}

.modal-logo-text {
    margin-left: 0.5rem;
    font-size: 1.5rem;
    /* 2xl */
    letter-spacing: 0.1em;
    color: #ffffff;
}

.modal-header-catalog {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
}

.modal-line {
    height: 1px;
    background-color: #333;
    flex-grow: 1;
    max-width: 100px;
}

@media (max-width: 576px) {
    .modal-line {
        display: none;
    }
}

.modal-main-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-align: center;
    letter-spacing: -0.5px;
}

@media (min-width: 640px) {
    .modal-main-title {
        font-size: 1.875rem;
    }
}

.modal-slash {
    color: #E51D24;
    font-weight: 900;
    font-style: italic;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

@media (min-width: 640px) {
    .modal-slash {
        font-size: 1.875rem;
    }
}

.modal-description {
    color: #9CA3AF;
    /* gray-400 */
    margin-top: 0.75rem;
    font-size: 0.875rem;
    /* sm */
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.625;
}

/* Formulário e Inputs (Grid System) */
.modal-form {
    display: block;
}

.modal-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    margin-bottom: 1rem;
    /* Ajuste este valor para diminuir/aumentar o espaço entre as linhas */
}

.modal-col {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    width: 100%;
}

.modal-col-4 {
    width: 33.333333%;
}

.modal-col-6 {
    width: 50%;
}

.modal-col-8 {
    width: 66.666667%;
}

.modal-col-12 {
    width: 100%;
}

.modal-form-group {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-label {
    display: block;
    font-size: 0.75rem;
    /* text-xs */
    font-weight: 600;
    color: #9CA3AF;
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-input {
    width: 100%;
    background-color: #111111;
    border: 1px solid #374151;
    /* gray-700 */
    color: #ffffff;
    border-radius: 0.375rem;
    /* rounded-md */
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s;
    font-family: inherit;
}

.modal-input:focus {
    outline: none;
    border-color: #E51D24;
    box-shadow: 0 0 8px rgba(229, 29, 36, 0.4);
}

.modal-input::placeholder {
    color: #4B5563;
    /* gray-600 */
}

.modal-textarea {
    resize: vertical;
}

/* Grades Dinâmicas para Produtos e Tamanhos */
.modal-radio-grid-produtos {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.modal-radio-grid-produtos .modal-radio-label {
    width: 70%;
}

.modal-radio-grid-sublimados {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.modal-radio-grid-sublimados .modal-radio-label {
    width: 100%;
    text-align: center;
}

.modal-radio-grid-sublimados .modal-radio-pill {
    width: 100%;
}

.modal-radio-grid-silks {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
}

.modal-radio-grid-silks .modal-radio-label {
    width: 100%;
    text-align: center;
}

/* Linha 1: 3 itens dividindo o espaço (span 2 de 6 = 33%) */
.modal-radio-grid-silks .modal-radio-label:nth-child(1),
.modal-radio-grid-silks .modal-radio-label:nth-child(2),
.modal-radio-grid-silks .modal-radio-label:nth-child(3) {
    grid-column: span 2;
}

/* Linha 2: 2 itens dividindo o espaço (span 3 de 6 = 50%) */
.modal-radio-grid-silks .modal-radio-label:nth-child(4),
.modal-radio-grid-silks .modal-radio-label:nth-child(5) {
    grid-column: span 3;
}

.modal-radio-grid-silks .modal-radio-pill {
    width: 100%;
}

.modal-radio-label {
    cursor: pointer;
    position: relative;
}

.modal-radio-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.modal-radio-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background-color: #111111;
    border: 1px solid #374151;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #D1D5DB;
    /* gray-300 */
    transition: all 0.2s;
    text-align: center;
}

.modal-radio-label:hover .modal-radio-pill {
    border-color: #4B5563;
    background-color: #1f2937;
}

.modal-radio-input:checked+.modal-radio-pill {
    border-color: #E51D24;
    color: #ffffff;
    background-color: rgba(229, 29, 36, 0.1);
    box-shadow: 0 0 8px rgba(229, 29, 36, 0.4);
}

/* Upload de Imagem */
.modal-upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 8rem;
    /* 32 */
    border: 2px dashed #4B5563;
    /* gray-600 */
    border-radius: 0.5rem;
    background-color: #111111;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-upload-box:hover {
    border-color: #E51D24;
    background-color: rgba(229, 29, 36, 0.05);
}

.modal-file-input {
    display: none;
}

.modal-upload-icon {
    width: 2rem;
    height: 2rem;
    color: #6B7280;
    /* gray-500 */
    margin-bottom: 0.5rem;
}

.modal-upload-box:hover .modal-upload-icon {
    color: #E51D24;
}

.modal-upload-text {
    font-size: 0.875rem;
    color: #D1D5DB;
}

.modal-upload-desc {
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 0.25rem;
}

/* Preview de Imagem */
.modal-preview-box {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #374151;
    background: #000;
    margin-top: 0.5rem;
}

.modal-preview-box img {
    width: 100%;
    display: block;
    max-height: 250px;
    object-fit: contain;
}

.modal-remove-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #E51D24;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.modal-remove-btn:hover {
    transform: scale(1.1);
}

/* Botão Submit */
.modal-submit-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.modal-btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background-color: #E51D24;
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 1rem;
    border-radius: 0.375rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 0 15px rgba(229, 29, 36, 0.4);
}

@media (min-width: 640px) {
    .modal-btn-submit {
        width: auto;
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

.modal-btn-submit:hover {
    background-color: #b91c1c;
    /* red-700 */
    box-shadow: 0 0 20px rgba(229, 29, 36, 0.6);
}

.modal-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.modal-submit-icon {
    width: 1.25rem;
    height: 1.25rem;
}

/* Responsividade do Botão de Envio (Mobile Side-by-Side) */
.responsive-submit-container {
    margin-top: 0;
}

.responsive-submit-btn {
    height: auto;
    padding: 1rem 0.5rem;
    text-align: center;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.responsive-submit-icon {
    margin-bottom: 0;
    margin-right: 0.5rem;
}

.responsive-submit-text {
    font-size: 0.9rem;
}

.text-desktop {
    display: none;
}

@media (min-width: 768px) {
    .responsive-submit-container {
        margin-top: 1rem;
        height: auto;
    }

    .responsive-submit-btn {
        height: auto;
        padding-left: 3rem;
        padding-right: 3rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
        flex-direction: row;
    }

    .responsive-submit-icon {
        margin-bottom: 0;
    }

    .responsive-submit-text {
        font-size: 1.125rem;
    }

    .text-desktop {
        display: inline;
    }
}

/* Spinner Animado */
.modal-spinner {
    width: 1.25rem;
    height: 1.25rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: modal-spin 1s infinite linear;
}

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

/* -------------------------------------------
   CORES E QUANTIDADES
------------------------------------------- */
.modal-colors-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background-color: #111111;
    border: 1px solid #374151;
    border-radius: 0.375rem;
    padding: 15px;
    justify-content: space-between;
}

.modal-color-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 45px;
}

.modal-color-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid transparent;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.modal-color-circle:hover {
    transform: scale(1.1);
}

.modal-color-input {
    width: 100%;
    background-color: #1a1a1a;
    border: 1px solid #374151;
    color: #ffffff;
    border-radius: 4px;
    padding: 4px;
    font-size: 0.75rem;
    text-align: center;
    transition: all 0.2s;
    font-family: inherit;
    /* Remove arrows in some browsers */
    -moz-appearance: textfield;
}

.modal-color-input::-webkit-outer-spin-button,
.modal-color-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.modal-color-input:focus {
    outline: none;
    border-color: #E51D24;
}

/* ==========================================================================
   MODAL HÍBRIDO (Slider de Facas + Spotlight)
   ========================================================================== */

.modal-hybrid-container {
    background-color: #111;
    border-radius: 8px;
    border: 1px solid rgba(39, 39, 42, 0.5);
    /* border-zinc-800/50 */
    display: flex;
    flex-direction: column;
    margin: 8px 0;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .modal-hybrid-container {
        flex-direction: row;
    }
}

.modal-hybrid-left {
    width: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .modal-hybrid-left {
        width: 50%;
    }
}

.modal-hybrid-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 256px;
    height: 256px;
    background-color: rgba(229, 29, 36, 0.05);
    /* brand-red/5 */
    border-radius: 50%;
    filter: blur(48px);
    /* blur-3xl */
    pointer-events: none;
}

.modal-hybrid-slider-wrapper {
    position: relative;
    width: 100%;
    border-radius: 8px;
}

.modal-hybrid-slider {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    cursor: grab;
    padding-right: 48px;
    padding-bottom: 4px;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.modal-hybrid-slider::-webkit-scrollbar {
    display: none;
}

.modal-hybrid-slider:active {
    cursor: grabbing;
}

.modal-hybrid-slider.active-drag {
    scroll-snap-type: none;
    cursor: grabbing;
}

.modal-slide-item {
    scroll-snap-align: start;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    background-color: #0F0F0F;
    /* brand-input */
    border: 1px solid #2A2A2A;
    /* brand-border */
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.modal-slide-item:hover {
    border-color: #71717a;
    /* hover:border-zinc-500 */
}

.modal-slide-item.active {
    background-color: rgba(229, 29, 36, 0.1);
    border: 2px solid #E51D24;
    box-shadow: 0 0 10px rgba(229, 29, 36, 0.2);
}

.modal-slide-icon {
    width: 24px;
    height: 24px;
    stroke: #666;
    stroke-width: 1.5;
    fill: none;
    transition: stroke 0.2s;
}

.modal-slide-item.active .modal-slide-icon {
    stroke: #E51D24;
    stroke-width: 2;
}

.modal-slide-text {
    font-size: 9px;
    font-weight: 700;
    color: #71717a;
    /* zinc-500 */
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.modal-slide-item.active .modal-slide-text {
    color: #E51D24;
}

.modal-fade-right {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 64px;
    background: linear-gradient(to left, #111, rgba(17, 17, 17, 0.8), transparent);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 4px;
    z-index: 5;
    transition: opacity 0.3s;
}

.modal-fade-left {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 64px;
    background: linear-gradient(to right, #111, rgba(17, 17, 17, 0.8), transparent);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 4px;
    z-index: 5;
    transition: opacity 0.3s;
}

@keyframes bounce-x {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(25%);
    }
}

@keyframes bounce-x-left {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(-25%);
    }
}

.modal-arrow-bounce-right {
    width: 20px;
    height: 20px;
    color: #E51D24;
    animation: bounce-x 1s infinite;
    filter: drop-shadow(0 0 8px rgba(229, 29, 36, 0.6));
}

.modal-arrow-bounce-left {
    width: 20px;
    height: 20px;
    color: #E51D24;
    animation: bounce-x-left 1s infinite;
    filter: drop-shadow(0 0 8px rgba(229, 29, 36, 0.6));
}

.modal-hybrid-right {
    width: 100%;
    background-color: #0a0a0a;
    border-top: 1px solid #27272a;
    /* border-zinc-800 */
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 260px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .modal-hybrid-right {
        width: 50%;
        border-top: none;
        border-left: 1px solid #27272a;
    }
}

.modal-grid-bg {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    transition: opacity 0.3s;
    background-image: radial-gradient(#fff 1px, transparent 1px);
    background-size: 15px 15px;
}

.modal-hybrid-right:hover .modal-grid-bg {
    opacity: 0.2;
}

.modal-spotlight-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 24px 24px 16px;
}

@media (max-width: 767px) {
    .tpl-input-qtd {
        width: 50%;
    }
}

.modal-spotlight-svg {
    width: 80px;
    height: 80px;
    fill: #161616;
    stroke: #E51D24;
    stroke-width: 1.5;
    filter: drop-shadow(0 0 20px rgba(229, 29, 36, 0.4));
    transition: transform 0.5s;
}

.modal-hybrid-right:hover .modal-spotlight-svg {
    transform: scale(1.1);
}

.modal-spotlight-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

@media (min-width: 768px) {
    .modal-hybrid-right:hover .modal-spotlight-img {
        transform: scale(1.8);
        z-index: 50;
    }
}

.modal-spotlight-img.zoomed {
    transform: scale(1.8);
    z-index: 50;
}

.modal-slide-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: transform 0.2s, filter 0.2s;
    filter: grayscale(100%) opacity(0.6);
}

.modal-slide-item.active .modal-slide-img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

.modal-spotlight-footer {
    width: 100%;
    position: relative;
    z-index: 10;
    padding: 10px 24px;
    border-top: 1px solid rgba(39, 39, 42, 0.6);
    background-color: rgba(5, 5, 5, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

@media (max-width: 767px) {
    .hidden-mobile {
        display: none !important;
    }

    .modal-colors-container {
        justify-content: space-between;
        row-gap: 15px;
        column-gap: 0;
    }

    .modal-color-item {
        flex: 0 0 19.5%;
        /* Force exactly 5 per row safely */
        width: auto;
    }

    .modal-color-item .modal-color-input {
        width: 45px;
    }
}

@media (min-width: 768px) {
    .modal-col-md-3 {
        width: 25%;
    }

    .modal-col-md-6 {
        width: 50%;
    }

    .modal-col-md-12 {
        width: 100%;
    }
}