﻿/* ==========================================================================
   PEDIDO - WRAP / BASE
   ========================================================================== */

.pedido-wrap {
    background: var(--standar-bg);
}

.pedido-card__body {
    margin-bottom: clamp(2.9rem, 1.8vw, 6.2rem);
}

.pedido-card__body-head {
    margin-bottom: clamp(2.9rem, 1.6vw, 5.2rem);
    padding-top: clamp(1.9rem, 1.6vw, 5.2rem);
}

.pedido-h1 {
    margin: 0;
    font-size: clamp(2.1rem, 1.9vw, 2.6rem);
    font-weight: 700;
}


/* ==========================================================================
   PEDIDO - MENSAJES OK / ERROR
   ========================================================================== */

.pedido-msg {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--standar-border);
    border-radius: 12px;
}

.pedido-msg__icon {
    color: var(--standar-muted) !important;
    font-size: 1rem;
    line-height: 1.1;
}

.pedido-msg__title {
    margin-bottom: 2px;
    font-weight: 800;
}

.pedido-msg__text {
    color: var(--standar-black);
}

.pedido-msg--ok {
    background: var(--color-success-apple);
    border-color: var(--color-success-apple-borde);
}

.pedido-msg--error {
    background: rgba(200, 58, 58, 0.06);
    border-color: rgba(200, 58, 58, 0.22);
}


/* ==========================================================================
   PEDIDO - GRID FORMULARIO
   ========================================================================== */

.pedido-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 22px;
}

.pedido-field--full {
    grid-column: 1 / -1;
}


/* ==========================================================================
   PEDIDO - LABELS / INPUTS
   ========================================================================== */

.pedido-label {
    display: block;
    margin-bottom: 8px;
    color: var(--standar-muted);
    font-size: 1.6rem;
    font-weight: 700;
}

.pedido-input,
.pedido-textarea {
    width: 100%;
    padding: 12px 14px;
    box-sizing: border-box;
    color: inherit;
    background: #fff;
    border: 1px solid var(--standar-border);
    border-radius: var(--standar-input-radius);
    outline: none;
    font-size: clamp(1.4rem, 1.4vw, 1.6rem);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .pedido-input::placeholder,
    .pedido-textarea::placeholder {
        color: #98a2b3;
        font-size: clamp(1.4rem, 1.4vw, 1.6rem);
        font-style: italic;
    }

    .pedido-input:focus,
    .pedido-textarea:focus {
        border-color: rgba(31, 60, 143, 0.45);
        box-shadow: 0 0 0 4px rgba(31, 60, 143, 0.10);
    }

.pedido-textarea {
    min-height: 170px;
    resize: vertical;
}


/* ==========================================================================
   PEDIDO - BOTÓN ENVIAR
   ========================================================================== */

.pedido-btn {
    display: inline-block;
    min-width: 170px;
    padding: 12px 28px;
    color: #fff;
    background: var(--standar-blue);
    border: 0;
    border-radius: 999px;
    font-weight: 600;
    transition: background-color 0.25s ease, opacity 0.25s ease;
}

    .pedido-btn:hover {
        background: var(--standar-black);
    }

.btn-enviando {
    background-color: var(--azul-elegante) !important;
    border-color: var(--azul-elegante) !important;
    opacity: 0.85;
    cursor: not-allowed;
}


/* ==========================================================================
   PEDIDO - FOTOS
   ========================================================================== */

.pedido-fotos {
    grid-column: 1 / -1;
}

.pedido-fotos__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.foto-slot {
    position: relative;
    width: 100%;
}

.foto-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.foto-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.foto-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #fff;
    background: var(--base-color);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

    .foto-btn:hover {
        background: var(--standar-black);
    }

.foto-preview {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin-top: 0;
    padding: 10px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.foto-img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border: 1px solid #eee;
    border-radius: 8px;
}

.foto-meta {
    flex: 1;
    min-width: 0;
}

.foto-name {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.foto-size {
    font-size: 0.85rem;
    opacity: 0.7;
}

.foto-remove {
    position: absolute;
    top: 6px;
    right: 8px;
    background: transparent;
    border: 0;
    opacity: 0.6;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

    .foto-remove:hover {
        opacity: 1;
    }


/* ==========================================================================
   PEDIDO - LEGAL / BOTÓN
   ========================================================================== */

.pedido-legal {
    margin-top: 10px;
}

.pedido-legal__check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 1.4rem;
}

    .pedido-legal__check input,
    .pedido-legal__check input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--standar-blue);
        cursor: pointer;
    }

        .pedido-legal__check input[type="checkbox"]:checked {
            transform: scale(1.05);
        }

    .pedido-legal__check label {
        margin: 0;
        line-height: 1.4;
        cursor: pointer;
    }

.pedido-legal__btn {
    text-align: center;
}

.hr-separador {
    height: 2px;
    margin-top: 24px;
    margin-bottom: 30px;
    background-color: var(--standar-black);
    border: 0;
}


/* ==========================================================================
   PEDIDO - VALIDACIÓN / ERRORES
   ========================================================================== */

input.input-validation-error,
textarea.input-validation-error,
select.input-validation-error {
    background-color: #fff5f5;
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.field-validation-error {
    color: #dc3545;
    font-size: 0.875rem;
}

.pedido-input.is-invalid,
.pedido-textarea.is-invalid,
.form-check-input.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
    .pedido-grid {
        grid-template-columns: 1fr;
    }

    .pedido-fotos {
        grid-column: 1 / -1;
    }
}
