/* 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.4rem;
    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.3rem;
    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-row:last-child {
    margin-bottom: 0;
}

.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%;
}

@media (min-width: 768px) {
    .modal-col-md-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;
}

/* Rádios de Tipo de Produto */
.modal-radio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.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);
    }
}