﻿/* === CAMPOS Y FORM GROUPS === */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

    .form-group label {
        font-size: 14px;
        font-weight: 500;
        margin-bottom: 6px;
    }

input,
select,
textarea {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    background-color: #fff;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 14px;
    border: 1px solid #d1d1d1;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    outline: none;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    width: 100%;
    box-sizing: border-box;
    height: 44px;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

    .form-group input:focus,
    .form-group textarea:focus,
    .form-group select:focus {
        border-color: #0078d4;
        box-shadow: 0 0 0 2px rgba(0,120,212,0.2);
    }

/* === INLINE GROUP === */
.inline-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

    .inline-group .field-container {
        flex: 1 1 0;
        min-width: 150px;
    }

        .inline-group .field-container label {
            display: block;
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 6px;
        }

        .inline-group .field-container input,
        .inline-group .field-container select,
        .inline-group .field-container textarea {
            padding: 12px 14px;
            border: 1px solid #d1d1d1;
            border-radius: 6px;
            font-size: 14px;
            color: #333;
            outline: none;
            transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
            width: 100%;
            box-sizing: border-box;
            height: 44px;
        }

            .inline-group .field-container input:focus,
            .inline-group .field-container select:focus,
            .inline-group .field-container textarea:focus {
                border-color: #0078d4;
                box-shadow: 0 0 0 2px rgba(0,120,212,0.2);
            }

/* === INPUTS CON ICONO === */
.input-with-icon {
    position: relative;
    width: 100%;
    display: inline-block;
}

    .input-with-icon i {
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: #666;
        font-size: 15px;
        z-index: 2;
        pointer-events: none;
    }

    .input-with-icon input {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 10px 12px 10px 36px;
        border: 1px solid #ccc;
        border-radius: 6px;
        height: 40px;
        background-color: #fff;
        font-size: 14px;
        color: #222;
    }

        .input-with-icon input:focus {
            border-color: #0078d4;
            box-shadow: 0 0 0 2px rgba(0,120,212,0.2);
            outline: none;
        }

/* === LOOKUP FIELD === */
.lookup-container {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.lookup-input-wrapper {
    flex: 1;
    position: relative;
}

    .lookup-input-wrapper input {
        width: 100%;
        padding: 12px 14px 12px 38px;
        border: 1px solid #d1d1d1;
        border-radius: 6px 0 0 6px;
        font-size: 14px;
        height: 44px;
        box-sizing: border-box;
    }

        .lookup-input-wrapper input.lookup-full {
            border-radius: 6px;
        }

    .lookup-input-wrapper .lookup-icon {
        position: absolute;
        top: 50%;
        left: 12px;
        transform: translateY(-50%);
        color: #666;
        font-size: 14px;
    }

.lookup-btn.lookup-add {
    width: 44px;
    height: 44px;
    border: 1px solid #d1d1d1;
    border-left: none;
    border-radius: 0 6px 6px 0;
    background-color: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s ease-in-out;
}

    .lookup-btn.lookup-add:hover {
        background-color: #e5e5e5;
        color: #28a745;
    }

/* === LOOKUP DROPDOWN === */
.lookup-dropdown {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid #d1d1d1;
    border-top: none;
    border-radius: 0 0 6px 6px;
    background: #fff;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 5000;
    position: absolute;
    top: 100%;
    left: 0;
}

    .lookup-dropdown li {
        padding: 10px 14px;
        font-size: 14px;
        cursor: pointer;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }

        .lookup-dropdown li:hover {
            background-color: #f0f0f0;
        }

        .lookup-dropdown li.lookup-action {
            border-top: 1px solid #eee;
            padding: 6px 10px;
            font-size: 12px;
            color: #777;
            text-align: right;
            background-color: #fff;
            font-style: italic;
            user-select: none;
        }

        .lookup-dropdown li.lookup-more {
            font-weight: 400;
        }

        .lookup-dropdown li.lookup-close {
            font-weight: 400;
            color: #888;
        }

            .lookup-dropdown li.lookup-close::before {
                content: "✕ ";
                color: #aaa;
                font-size: 11px;
                vertical-align: middle;
            }

/* === VARIOS === */
input.invalid {
    border-color: red;
    animation: shake 0.2s 2;
}

.field-validation-error {
    color: #d32f2f;
    font-size: 13px;
    margin-top: 4px;
    margin-left: 2px;
    font-weight: 500;
    letter-spacing: 0.01em;
    animation: fadeIn 0.2s;
}

input.readonly-lookup {
    cursor: pointer;
    background-color: #fafafa;
}

.btn-geo {
    height: 44px;
    min-width: 100%;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid #d1d1d1;
    background-color: #f5f5f5;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease-in-out;
}

    .btn-geo:hover {
        background-color: #e5e5e5;
    }

/* === AUTOCOMPLETE === */
[id^="suggestions-direccion-"] {
    background: #fff;
    border: 1px solid #d1d1d1;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    max-height: 220px;
    overflow-y: auto;
    font-size: 15px;
    z-index: 5000;
}

    [id^="suggestions-direccion-"] > div {
        padding: 12px 16px;
        cursor: pointer;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border: none;
    }

        [id^="suggestions-direccion-"] > div:hover {
            background-color: #f5f5f5;
        }

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-3px);
    }

    50% {
        transform: translateX(3px);
    }

    75% {
        transform: translateX(-3px);
    }

    100% {
        transform: translateX(0);
    }
}
/* === INLINE FORM WRAPPER === */
.inline-form-wrapper {
    background: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    margin: 10px 0 100px 0; /* deja hueco debajo del contenido */
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* Encabezado */
.inline-form-header h2 {
    font-size: 17px;
    text-align:center;
    font-weight: 600;
    color: #333333;
    margin: 0 0 5px 0;
    padding-bottom: 6px;

}
.inline-form-header h6 {
    display:none;
}
.inline-form-body {
    display: flex;
    flex-direction: column;
}

/* Footer */
.inline-form-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%; /* ocupa todo el ancho visible */
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 18px;
    box-sizing: border-box;
    z-index: 1000; /* por encima del contenido */
}


    /* Si quieres que el botón no se pegue al borde */
    .inline-form-footer .btn {
        min-width: 45%;
        max-height: 50px;
    }
