/* ========================================
   FORMS CSS
   Formularios globales reutilizables
======================================== */

/* ========================================
   FORM WRAPPER
======================================== */

.form-wrapper {
    padding-top: 10px;
}

/* ========================================
   FORM CONTAINER
======================================== */

.form-container {

    background: var(--card-bg);

    border-radius: var(--radius-lg);

    border: 1px solid var(--border);

    box-shadow: var(--shadow-md);

    padding: 36px;
}

/* ========================================
   FORM HEADER
======================================== */

.form-header {

    display: flex;

    align-items: center;

    gap: 18px;

    margin-bottom: 36px;
}

/* ICON */

.form-icon {

    width: 72px;
    height: 72px;

    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            var(--primary),
            #3b82f6
        );

    color: white;

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

    font-size: 30px;

    flex-shrink: 0;
}

/* TITLE */

.form-title {

    font-size: 32px;

    font-weight: 700;

    color: var(--text);

    margin-bottom: 4px;
}

/* SUBTITLE */

.form-subtitle {

    color: var(--muted);

    font-size: 15px;
}

/* ========================================
   LABELS
======================================== */

.custom-label {

    display: block;

    margin-bottom: 10px;

    font-weight: 600;

    color: var(--text);
}

/* ========================================
   DJANGO INPUTS
======================================== */

.form-container input,
.form-container select,
.form-container textarea {

    width: 100%;

    border: 1px solid #dbe3ee;

    border-radius: 14px;

    padding: 14px 16px;

    font-size: 15px;

    background: #f9fbfd;

    transition: var(--transition);

    outline: none;
}

/* TEXTAREA */

.form-container textarea {

    min-height: 120px;

    resize: vertical;
}

/* ========================================
   FOCUS
======================================== */

.form-container input:focus,
.form-container select:focus,
.form-container textarea:focus {

    border-color: var(--primary);

    background: white;

    box-shadow:
        0 0 0 4px rgba(37,99,235,0.10);
}

/* ========================================
   PLACEHOLDER
======================================== */

.form-container input::placeholder,
.form-container textarea::placeholder {

    color: #9ca3af;
}

/* ========================================
   DATE & TIME
======================================== */

.form-container input[type="date"],
.form-container input[type="time"] {

    appearance: none;
}

/* ========================================
   INPUT HELP
======================================== */

.input-help {

    margin-top: 8px;

    color: var(--muted);

    font-size: 13px;
}

/* ========================================
   FIELD ERRORS
======================================== */

.field-error {

    margin-top: 8px;

    color: var(--danger);

    font-size: 13px;

    font-weight: 500;
}

/* ========================================
   INVALID INPUTS
======================================== */

.form-container input.is-invalid,
.form-container select.is-invalid,
.form-container textarea.is-invalid {

    border-color: var(--danger);

    background: #fef2f2;
}

/* ========================================
   FORM ACTIONS
======================================== */

.form-actions {

    display: flex;

    justify-content: flex-end;

    gap: 12px;

    margin-top: 32px;

    flex-wrap: wrap;
}

/* ========================================
   SELECTION CARD
======================================== */

.selection-card {

    border: 1px solid var(--border);

    border-radius: 20px;

    padding: 24px;

    background: #fcfdff;
}

/* HEADER */

.selection-header {

    display: flex;

    align-items: center;

    gap: 14px;

    flex-wrap: wrap;
}

/* BADGE */

.selection-badge {

    background: #dbeafe;

    color: var(--primary);

    font-size: 13px;

    font-weight: 700;

    padding: 8px 12px;

    border-radius: 999px;
}

/* SECONDARY */

.selection-badge.secondary {

    background: #dcfce7;

    color: #15803d;
}

/* TITLE */

.selection-title {

    margin: 0;

    font-weight: 700;

    color: var(--text);
}

/* ========================================
   DIVIDER
======================================== */

.divider-container {

    display: flex;

    align-items: center;

    gap: 14px;

    margin: 30px 0;
}

.divider-line {

    flex: 1;

    height: 1px;

    background: var(--border);
}

.divider-text {

    color: var(--muted);

    font-size: 13px;

    font-weight: 700;

    background: white;

    padding: 0 10px;
}

/* ========================================
   CHECKBOXES & RADIOS
======================================== */

.form-container input[type="checkbox"],
.form-container input[type="radio"] {

    width: auto;

    margin-right: 8px;

    accent-color: var(--primary);
}

/* ========================================
   FILE INPUT
======================================== */

.form-container input[type="file"] {

    padding: 12px;

    background: white;
}

/* ========================================
   SEARCH INPUT
======================================== */

.form-container input[type="search"] {

    appearance: none;
}

/* ========================================
   DISABLED
======================================== */

.form-container input:disabled,
.form-container select:disabled,
.form-container textarea:disabled {

    background: #f3f4f6;

    cursor: not-allowed;

    opacity: 0.7;
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 768px) {

    .form-container {

        padding: 24px;

        border-radius: 20px;
    }

    .form-header {

        align-items: flex-start;

        gap: 14px;
    }

    .form-icon {

        width: 60px;
        height: 60px;

        border-radius: 18px;

        font-size: 24px;
    }

    .form-title {

        font-size: 26px;
    }

    .form-actions {

        flex-direction: column-reverse;
    }

    .selection-card {

        padding: 20px;

        border-radius: 18px;
    }

}

@media (max-width: 480px) {

    .form-container {
        padding: 20px;
    }

    .form-title {
        font-size: 24px;
    }

}

/* ========================================
   DELETE CONTAINER
======================================== */

.delete-container {

    background: var(--card-bg);

    border-radius: 28px;

    border: 1px solid var(--border);

    box-shadow: var(--shadow-md);

    padding: 42px;

    text-align: center;
}

/* ========================================
   DELETE ICON
======================================== */

.delete-icon-wrapper {

    display: flex;

    justify-content: center;

    margin-bottom: 24px;
}

.delete-icon {

    width: 96px;
    height: 96px;

    border-radius: 28px;

    background:
        linear-gradient(
            135deg,
            #dc2626,
            #ef4444
        );

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 42px;

    box-shadow:
        0 12px 30px rgba(220,38,38,0.25);
}

/* ========================================
   TITLE
======================================== */

.delete-title {

    font-size: 32px;

    font-weight: 700;

    color: var(--text);

    margin-bottom: 12px;
}

/* ========================================
   SUBTITLE
======================================== */

.delete-subtitle {

    color: var(--muted);

    font-size: 15px;

    max-width: 420px;

    margin:
        0 auto 32px;
}

/* ========================================
   PRODUCT CARD
======================================== */

.delete-product-card {

    background: #fafafa;

    border: 1px solid var(--border);

    border-radius: 22px;

    padding: 24px;

    text-align: left;
}

/* ========================================
   PRODUCT ICON
======================================== */

.delete-product-icon {

    width: 58px;
    height: 58px;

    border-radius: 16px;

    background: #fee2e2;

    color: #dc2626;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 24px;

    flex-shrink: 0;
}

/* ========================================
   PRODUCT TITLE
======================================== */

.delete-product-title {

    font-weight: 700;

    color: var(--text);

    margin-bottom: 4px;
}

.delete-product-subtitle {

    color: var(--muted);

    font-size: 13px;
}

/* ========================================
   DETAILS
======================================== */

.delete-product-details {

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(140px, 1fr));

    gap: 16px;
}

/* ITEM */

.delete-detail-item {

    background: white;

    border-radius: 16px;

    padding: 16px;

    border: 1px solid #f1f5f9;
}

/* LABEL */

.delete-detail-label {

    display: block;

    color: var(--muted);

    font-size: 12px;

    margin-bottom: 6px;
}

/* VALUE */

.delete-detail-value {

    font-weight: 700;

    color: var(--text);
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 768px) {

    .delete-container {

        padding: 28px;

        border-radius: 22px;
    }

    .delete-title {

        font-size: 26px;
    }

    .delete-icon {

        width: 82px;
        height: 82px;

        border-radius: 24px;

        font-size: 34px;
    }

    .delete-product-card {

        padding: 20px;
    }

}

@media (max-width: 480px) {

    .delete-container {

        padding: 22px;
    }

}


/* ========================================
   RING FORM
======================================== */

.ring-form-container {

    border-top:
        4px solid #dc2626;
}

/* ========================================
   RING ICON
======================================== */

.ring-form-icon {

    background:
        linear-gradient(
            135deg,
            #dc2626,
            #dc2626
        );

    box-shadow:
        0 12px 30px rgba(124,58,237,0.25);
}


/* ========================================
   RING DELETE
======================================== */

.ring-delete-container {

    border-top:
        4px solid #dc2626;
}

/* ========================================
   ICON
======================================== */

.ring-delete-icon {

    background:
        linear-gradient(
            135deg,
            #dc2626,
            #dc2626
        );

    box-shadow:
        0 12px 30px rgba(124,58,237,0.25);
}

/* ========================================
   PRODUCT ICON
======================================== */

.ring-product-icon {

    background: #f3e8ff;

    color: #dc2626;
}

/* ========================================
   PRICE
======================================== */

.ring-price-text {

    color: #dc2626;
}


/* ========================================
   PAYMENT FORM
======================================== */

.payment-form-container {

    border-top:
        4px solid #15803d;
}

/* ========================================
   ICON
======================================== */

.payment-form-icon {

    background:
        linear-gradient(
            135deg,
            #15803d,
            #22c55e
        );

    box-shadow:
        0 12px 30px rgba(21,128,61,0.25);
}

/* ========================================
   PAYMENT CARD
======================================== */

.payment-info-card {

    background:
        linear-gradient(
            135deg,
            #f0fdf4,
            #ffffff
        );
}

/* ========================================
   EXTRA FORM
======================================== */

.extra-form-container {

    border-top:
        4px solid #475569;
}

/* ========================================
   ICON
======================================== */

.extra-form-icon {

    background:
        linear-gradient(
            135deg,
            #475569,
            #64748b
        );

    box-shadow:
        0 12px 30px rgba(71,85,105,0.25);
}

/* ========================================
   INFO CARD
======================================== */

.extra-info-card {

    background:
        linear-gradient(
            135deg,
            #f8fafc,
            #ffffff
        );
}

/* ========================================
   OBSERVACION FORM
======================================== */

.observacion-form-container {

    border-top:
        4px solid #111827;
}

/* ========================================
   ICON
======================================== */

.observacion-form-icon {

    background:
        linear-gradient(
            135deg,
            #111827,
            #374151
        );

    box-shadow:
        0 12px 30px rgba(17,24,39,0.25);
}

/* ========================================
   INFO CARD
======================================== */

.observacion-info-card {

    background:
        linear-gradient(
            135deg,
            #fafafa,
            #ffffff
        );
}

/* ========================================
   TEXTAREA
======================================== */

.observacion-form-container textarea {

    min-height: 180px;

    resize: vertical;
}

/* ========================================
   OBSERVACION DELETE
======================================== */

.observacion-delete-container {

    border-top:
        4px solid #111827;
}

/* ========================================
   ICON
======================================== */

.observacion-delete-icon {

    background:
        linear-gradient(
            135deg,
            #111827,
            #374151
        );

    box-shadow:
        0 12px 30px rgba(17,24,39,0.25);
}

/* ========================================
   CARD
======================================== */

.observacion-delete-card {

    background: #fafafa;

    border: 1px solid #f1f5f9;

    border-radius: 22px;

    padding: 24px;

    text-align: left;
}

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

.observacion-delete-header {

    margin-bottom: 18px;
}

/* ========================================
   BADGE
======================================== */

.observacion-delete-badge {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    background: #f3f4f6;

    color: #374151;

    padding: 8px 14px;

    border-radius: 999px;

    font-size: 13px;

    font-weight: 600;
}

/* ========================================
   TEXT
======================================== */

.observacion-delete-text {

    color: var(--text);

    line-height: 1.8;

    white-space: pre-line;

    font-size: 15px;
}

/* ========================================
   DISCOUNT FORM
======================================== */

.discount-form-container {

    border-top:
        4px solid #d97706;
}

/* ========================================
   ICON
======================================== */

.discount-form-icon {

    background:
        linear-gradient(
            135deg,
            #d97706,
            #f59e0b
        );

    box-shadow:
        0 12px 30px rgba(217,119,6,0.25);
}

/* ========================================
   INFO CARD
======================================== */

.discount-info-card {

    background:
        linear-gradient(
            135deg,
            #fffbeb,
            #ffffff
        );
}

/* ========================================
   DISCOUNT DELETE
======================================== */

.discount-delete-container {

    border-top:
        4px solid #d97706;
}

/* ========================================
   ICON
======================================== */

.discount-delete-icon {

    background:
        linear-gradient(
            135deg,
            #d97706,
            #f59e0b
        );

    box-shadow:
        0 12px 30px rgba(217,119,6,0.25);
}

/* ========================================
   PRODUCT ICON
======================================== */

.discount-product-icon {

    background: #fef3c7;

    color: #b45309;
}

/* ========================================
   PRICE
======================================== */

.discount-price-text {

    color: #b45309;
}


/* ========================================
   DELIVERY FORM
======================================== */

.delivery-form-container {

    border-top:
        4px solid #111827;
}

/* ========================================
   ICON
======================================== */

.delivery-form-icon {

    background:
        linear-gradient(
            135deg,
            #111827,
            #374151
        );

    box-shadow:
        0 12px 30px rgba(17,24,39,0.25);
}

/* ========================================
   INFO CARD
======================================== */

.delivery-info-card {

    background:
        linear-gradient(
            135deg,
            #fafafa,
            #ffffff
        );
}

/* ========================================
   INFO GRID
======================================== */

.delivery-info-grid {

    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(180px, 1fr));

    gap: 18px;

    margin-top: 20px;
}

/* ITEM */

.delivery-info-item {

    background: white;

    border: 1px solid #f1f5f9;

    border-radius: 16px;

    padding: 18px;
}

/* LABEL */

.delivery-info-label {

    font-size: 13px;

    color: var(--muted);

    font-weight: 600;

    margin-bottom: 8px;
}

/* VALUE */

.delivery-info-value {

    font-size: 16px;

    font-weight: 700;

    color: var(--text);
}

/* TOTAL */

.delivery-info-value.total {

    color: var(--primary);

    font-size: 20px;
}

/* ========================================
   TEXTAREA
======================================== */

.delivery-form-container textarea {

    min-height: 130px;

    resize: vertical;
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 768px) {

    .delivery-info-grid {

        grid-template-columns: 1fr;
    }

}