/* LNI Form Builder — Frontend Styles */

/* Form wrapper — 25% desktop, 50% tablet, 90% mobile, centered, bevel border */
.lni-form {
    width: 25%;
    margin: 20px auto;
    padding: 24px;
    background: #fff;
    border: 1px solid #c0c0c0;
    border-radius: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 1px 3px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

.lni-form *,
.lni-form *::before,
.lni-form *::after {
    box-sizing: border-box;
}

/* Title */
.lni-form__title {
    text-align: center;
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

/* Description */
.lni-form__description {
    text-align: center;
    margin: 0 0 16px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

/* Fields container */
.lni-form__fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

/* Single field */
.lni-form__field {
    display: flex;
    flex-direction: column;
}

.lni-form__label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.lni-form__label .required {
    color: #dc3232;
    margin-left: 2px;
}

/* Inputs */
.lni-form__field input,
.lni-form__field textarea,
.lni-form__field select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.lni-form__field input:focus,
.lni-form__field textarea:focus,
.lni-form__field select:focus {
    border-color: #6366f1;
}

.lni-form__field textarea {
    min-height: 80px;
    resize: vertical;
}

/* GDPR checkbox */
.lni-form__gdpr {
    margin-bottom: 12px;
}

.lni-form__gdpr label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1.4;
}

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

/* Submit button */
.lni-form__submit {
    margin-bottom: 8px;
}

.lni-form__button {
    width: 100%;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.lni-form__button:hover {
    opacity: 0.9;
}

.lni-form__button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Message */
.lni-form__message {
    text-align: center;
    font-size: 13px;
    min-height: 18px;
    margin-top: 6px;
}

.lni-form__message.success { color: #10b981; }
.lni-form__message.error { color: #ef4444; }
.lni-form__message.pending { color: #f59e0b; }

/* Popup overlay */
.lni-form--popup .lni-form__overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99998;
}

.lni-form--popup .lni-form__popup {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.lni-form--popup .lni-form__close {
    position: absolute;
    top: 10px; right: 14px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .lni-form {
        width: 50%;
    }
}

@media (max-width: 480px) {
    .lni-form {
        width: 90%;
        padding: 18px;
    }
}
