/**
 * GLV Desistimiento - Frontend Styles
 */

/* Wrapper */
.glv-des-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    font-family: 'Times New Roman', Times, serif;
}

.glv-des-form-container {
    background: #fff;
    border: 1px solid #333;
    padding: 40px 50px;
    position: relative;
}

/* Logo */
.glv-des-logo {
    margin-bottom: 30px;
}

.glv-des-logo img {
    max-width: 150px;
    height: auto;
}

/* Título */
.glv-des-title {
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    margin: 0 0 25px 0;
    color: #000;
    letter-spacing: 1px;
}

/* Subtítulo */
.glv-des-subtitle {
    font-size: 13px;
    font-style: italic;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: #000;
}

/* Asunto */
.glv-des-asunto {
    margin-bottom: 10px;
    font-size: 14px;
}

/* Fecha y lugar */
.glv-des-fecha-lugar {
    text-align: right;
    margin-bottom: 30px;
    font-size: 14px;
}

.glv-des-inline-input {
    border: none;
    border-bottom: 1px dotted #333;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    padding: 2px 5px;
    width: 150px;
    text-align: center;
}

.glv-des-inline-input:focus {
    outline: none;
    border-bottom-color: #ffb855;
}

.glv-des-fecha-auto {
    font-weight: normal;
}

/* Textos intro */
.glv-des-atencion {
    margin: 25px 0 20px;
    font-size: 14px;
}

.glv-des-intro {
    margin: 0 0 25px;
    font-size: 14px;
    line-height: 1.6;
}

/* Form */
.glv-des-form {
    margin-top: 20px;
}

/* Campos */
.glv-des-field {
    margin-bottom: 20px;
}

.glv-des-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #000;
}

/* Inputs con estilo de puntos */
.glv-des-input,
.glv-des-textarea {
    width: 100%;
    border: none;
    border-bottom: 1px dotted #333;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    padding: 8px 5px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.glv-des-input:focus,
.glv-des-textarea:focus {
    outline: none;
    border-bottom-color: #ffb855;
    border-bottom-style: solid;
}

.glv-des-textarea {
    resize: vertical;
    min-height: 60px;
    border: 1px dotted #333;
    padding: 10px;
}

.glv-des-textarea:focus {
    border-color: #ffb855;
    border-style: solid;
}

/* Filas */
.glv-des-row {
    display: flex;
    gap: 30px;
}

.glv-des-half {
    flex: 1;
}

/* Fotos inline */
.glv-des-field-productos label:first-child {
    display: block;
    margin-bottom: 10px;
}

/* Sección de fotos */
.glv-des-fotos-section {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.glv-des-fotos-label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

.glv-des-fotos-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    justify-content: flex-start;
}

.glv-des-foto-item {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.glv-des-foto-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 80px;
    padding: 10px;
    border: 2px dashed #ccc;
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.glv-des-foto-btn:hover {
    border-color: #ffb855;
    background: #fffbf5;
}

.glv-des-foto-btn.has-file {
    border-style: solid;
    border-color: #4caf50;
    background: #f1f8e9;
}

.glv-des-foto-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.glv-des-foto-text {
    font-size: 11px;
    color: #666;
}

.glv-des-foto-input {
    display: none;
}

.glv-des-foto-status {
    font-size: 10px;
    color: #4caf50;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.glv-des-foto-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border: none;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.glv-des-foto-remove:hover {
    transform: scale(1.1);
}

.glv-des-add-foto {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 15px;
    font-size: 13px;
    color: #666;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    box-sizing: border-box;
}

.glv-des-add-foto:hover {
    background: #f5f5f5;
    border-color: #999;
}

.glv-des-add-foto:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.glv-des-foto-count {
    font-size: 11px;
    color: #999;
}

/* DNI row */
.glv-des-dni-row {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.glv-des-dni-row .glv-des-input {
    flex: 1;
}

.glv-des-dni-upload {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    border: 1px solid #333;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.glv-des-dni-upload:hover {
    background: #f5f5f5;
}

.glv-des-dni-upload.has-file {
    background: #e8f5e9;
    border-color: #4caf50;
}

/* Botón submit */
.glv-des-submit-wrap {
    text-align: right;
    margin-top: 30px;
    padding-top: 20px;
}

.glv-des-submit {
    display: inline-block;
    width: 100%;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #fff;
    background-color: #ffb855;
    border: 2px solid #ffb855;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.glv-des-submit:hover {
    background-color: #0ca2ac;
    border-color: #0ca2ac;
    color: #fff;
}

.glv-des-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mensajes */
.glv-des-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.glv-des-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.glv-des-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Loading */
.glv-des-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.glv-des-form.loading .glv-des-submit::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: glv-spin 0.8s linear infinite;
    vertical-align: middle;
}

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

/* Responsive */
@media (max-width: 600px) {
    .glv-des-form-container {
        padding: 25px 15px;
    }

    .glv-des-title {
        font-size: 18px;
    }

    .glv-des-row {
        flex-direction: column;
        gap: 0;
    }

    .glv-des-fecha-lugar {
        text-align: left;
    }

    .glv-des-dni-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .glv-des-dni-upload {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .glv-des-fotos-section {
        padding: 10px;
    }

    .glv-des-fotos-container {
        justify-content: center;
    }

    .glv-des-foto-btn {
        width: 85px;
        height: 70px;
        padding: 8px;
    }

    .glv-des-foto-icon {
        font-size: 20px;
    }

    .glv-des-foto-text {
        font-size: 10px;
    }

    .glv-des-add-foto {
        font-size: 12px;
        padding: 10px;
    }
}

/* Print styles */
@media print {
    .glv-des-wrapper {
        padding: 0;
    }
    
    .glv-des-form-container {
        border: none;
        padding: 0;
    }
    
    .glv-des-submit-wrap {
        display: none;
    }
}
