/**
 * Lymcon Request Info - Frontend Styles
 *
 * @package LymconReqInfo
 * @since   1.0.0
 */

/* ==========================================================================
   Button "Solicitar precio"
   ========================================================================== */
.lymcon-req-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 1px solid;
    border-radius: 4px;
    transition: all 0.2s ease;
    /* Default colors - overridden by dynamic CSS */
    background-color: #0073aa;
    color: #ffffff;
    border-color: #0073aa;
}

.lymcon-req-button:hover,
.lymcon-req-button:focus {
    background-color: #005a87;
    color: #ffffff;
    text-decoration: none;
    outline: none;
}

.lymcon-req-button:active {
    transform: translateY(1px);
}

.lymcon-req-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

/* Helper text */
.lymcon-req-helper-text {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* ==========================================================================
   Modal
   ========================================================================== */
.lymcon-req-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.lymcon-req-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay */
.lymcon-req-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Content */
.lymcon-req-modal__content {
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Animations */
.lymcon-req-modal--fade .lymcon-req-modal__content {
    animation: lymconReqFadeIn 0.3s ease;
}

.lymcon-req-modal--slide .lymcon-req-modal__content {
    animation: lymconReqSlideIn 0.3s ease;
}

@keyframes lymconReqFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes lymconReqSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close button */
.lymcon-req-modal__close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    padding: 0;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    transition: color 0.2s ease;
}

.lymcon-req-modal__close:hover {
    color: #000;
}

/* Header */
.lymcon-req-modal__header {
    padding: 20px 50px 15px 20px;
    border-bottom: 1px solid #eee;
}

.lymcon-req-modal__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
}

.lymcon-req-modal__subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    color: #666;
}

/* Body */
.lymcon-req-modal__body {
    padding: 20px;
}

/* ==========================================================================
   Form
   ========================================================================== */
.lymcon-req-form__field {
    margin-bottom: 15px;
}

.lymcon-req-form__field:last-child {
    margin-bottom: 0;
}

.lymcon-req-form__label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #1d2327;
}

.lymcon-req-form__label .required {
    color: #d63638;
}

.lymcon-req-form__input,
.lymcon-req-form__textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    line-height: 1.5;
    color: #1d2327;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lymcon-req-form__input:focus,
.lymcon-req-form__textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.lymcon-req-form__input.has-error,
.lymcon-req-form__textarea.has-error {
    border-color: #d63638;
}

.lymcon-req-form__textarea {
    min-height: 100px;
    resize: vertical;
}

.lymcon-req-form__error {
    display: none;
    margin-top: 5px;
    font-size: 13px;
    color: #d63638;
}

.lymcon-req-form__field.has-error .lymcon-req-form__error {
    display: block;
}

/* Honeypot - hidden from users */
.lymcon-req-form__hp {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

/* GDPR checkbox */
.lymcon-req-form__gdpr {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.lymcon-req-form__gdpr input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.lymcon-req-form__gdpr label {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.lymcon-req-form__gdpr a {
    color: #0073aa;
}

/* Submit button */
.lymcon-req-form__submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #0073aa;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.lymcon-req-form__submit:hover {
    background: #005a87;
}

.lymcon-req-form__submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.lymcon-req-form__submit.is-loading {
    position: relative;
    color: transparent;
}

.lymcon-req-form__submit.is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: lymconReqSpin 0.8s linear infinite;
}

@keyframes lymconReqSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Messages
   ========================================================================== */
.lymcon-req-message {
    display: none;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.lymcon-req-message.is-visible {
    display: block;
}

.lymcon-req-message--success {
    background: #edfaef;
    color: #00a32a;
    border: 1px solid #00a32a;
}

.lymcon-req-message--error {
    background: #fcf0f1;
    color: #d63638;
    border: 1px solid #d63638;
}

/* ==========================================================================
   Product info in modal
   ========================================================================== */
.lymcon-req-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 15px;
    background: #f6f7f7;
    border-radius: 4px;
}

.lymcon-req-product-info__image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.lymcon-req-product-info__title {
    font-weight: 600;
    color: #1d2327;
}

.lymcon-req-product-info__sku {
    font-size: 12px;
    color: #666;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media screen and (max-width: 600px) {
    .lymcon-req-modal__content {
        width: 95%;
        max-height: 95vh;
        border-radius: 4px;
    }

    .lymcon-req-modal__header {
        padding: 15px 40px 12px 15px;
    }

    .lymcon-req-modal__body {
        padding: 15px;
    }

    .lymcon-req-modal__close {
        top: 10px;
        right: 10px;
    }
}
