/**
 * Enquiry Form Plugin - Frontend Styles
 * Based on global.css design system
 */

/* Base Styles from global.css */
.input {
    height: 45px;
    border: 1px solid #E4E4E4;
    border-radius: 4px;
    outline: none;
    padding-inline: 12px;
}

input[type="date"],
input[type="month"],
input[type="time"],
input[type="datetime-local"] {
    -webkit-appearance: none;
}

.input:focus {
    outline: 2px solid #C9252C;
}

.area {
    height: 144px;
    border: 1px solid #E4E4E4;
    border-radius: 4px;
    outline: none;
    padding: 12px;
    resize: vertical;
}

.area:focus {
    outline: 2px solid #C9252C;
}

.btn {
    height: 45px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-inline: 24px;
    padding-block: 12px;
    border: 1px solid transparent;
    transition: opacity 0.3s ease;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.btn:hover {
    opacity: 0.8;
}

.btn--primary {
    background-color: #C9252C;
    color: #fff;
    border-color: #C9252C;
}

.btn--primary:hover {
    background-color: #B02128;
    border-color: #B02128;
    opacity: 1;
}

.btn--secondary {
    color: #898989;
    border-color: #E4E4E4;
    background-color: #fff;
}

.btn--secondary:hover {
    background-color: #E4E4E4;
    border-color: #E4E4E4;
    color: #898989;
    opacity: 1;
}

/* Form Wrapper */
.efp-form-wrapper {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
}

.efp-form-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    color: #2B2B2B;
}

/* Steps Indicator */
.efp-steps-indicator {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.efp-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.efp-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #D1D5DB;
    transition: all 0.3s ease;
}

@media (min-width: 768px) {
    .efp-step-circle {
        width: 48px;
        height: 48px;
    }
}

.efp-step-circle span {
    color: #B5B5B5;
    font-size: 16px;
    font-weight: 600;
}

@media (min-width: 768px) {
    .efp-step-circle span {
        font-size: 20px;
    }
}

.efp-step-label {
    font-size: 16px;
    font-weight: 600;
    color: #B5B5B5;
}

@media (min-width: 768px) {
    .efp-step-label {
        font-size: 18px;
    }
}

.efp-step-item.active .efp-step-circle {
    background-color: #C9252C;
}

.efp-step-item.active .efp-step-circle span {
    color: #FFFFFF;
}

.efp-step-item.active .efp-step-label {
    color: #2B2B2B;
}

.efp-step-connector {
    width: 96px;
    height: 2px;
    background-color: #D1D5DB;
    transition: all 0.3s ease;
}

.efp-step-connector.active {
    background-color: #2B2B2B;
}

/* Form Container */
.efp-form-container {
    background-color: #FFFFFF;
    border: 1px solid #E4E4E4;
    border-radius: 4px;
    padding: 16px;
}

@media (min-width: 768px) {
    .efp-form-container {
        padding: 24px;
    }
}

/* Step */
.efp-step {
    display: block;
}

.efp-step-hidden {
    display: none !important;
}

.efp-step-title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
    color: #2B2B2B;
}

@media (min-width: 768px) {
    .efp-step-title {
        margin-bottom: 24px;
    }
}

/* Form Grid */
.efp-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .efp-form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px 48px;
        margin-bottom: 24px;
    }
}

.efp-form-grid-step2 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .efp-form-grid-step2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

.efp-full-width {
    grid-column: 1 / -1;
}

.efp-span-2 {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .efp-span-2 {
        grid-column: span 2;
    }
}

/* Industrial and Office specific fields */
.efp-industrial-fields,
.efp-office-fields,
.efp-target-budget-field {
    display: grid;
    grid-column: 1 / -1;
    gap: 16px;
}

@media (min-width: 768px) {
    .efp-industrial-fields,
    .efp-office-fields,
    .efp-target-budget-field {
        gap: 24px;
    }
}

/* Form Group */
.efp-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

@media (min-width: 768px) {
    .efp-form-group {
        gap: 12px;
    }
}

.efp-label {
    font-size: 14px;
    font-weight: 500;
    color: #2B2B2B;
}

/* Inputs */
.efp-input {
    width: 100%;
}

.efp-select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23898989' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.efp-textarea {
    width: 100%;
    padding: 12px;
    resize: vertical;
    min-height: 100px;
}

/* Radio Group */
.efp-radio-group {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.efp-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #2B2B2B;
    user-select: none;
}

.efp-radio-input {
    display: none;
}

.efp-radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #E4E4E4;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.efp-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #E4E4E4;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.efp-radio-input:checked + .efp-radio-custom, .efp-radio-input:checked + .efp-checkbox-custom{
    border-color: #C9252C;
}

.efp-radio-input:checked + .efp-radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #C9252C;
}

.efp-radio-input:checked + .efp-checkbox-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: #C9252C;
}

.efp-radio-text {
    font-size: 14px;
}

/* Error Messages */
.efp-error-message {
    font-size: 12px;
    color: #C9252C;
    margin: 0;
    display: none;
}

.efp-error-message.show {
    display: block;
}

.efp-input.error {
    border-color: #C9252C !important;
}

.efp-input.error:focus {
    outline-color: #C9252C;
}

/* Form Actions */
.efp-form-actions {
    display: flex;
    justify-content: flex-end;
}

.efp-form-actions button {
    width: 100%;
}

@media (min-width: 768px) {
    .efp-form-actions button {
        width: auto;
        min-width: 140px;
    }
}

.efp-form-actions-step2 {
    gap: 12px;
}

.efp-btn-back {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Success Message */
.efp-success-message {
    text-align: center;
    padding: 60px 20px;
    background: #FFFFFF;
    border: 1px solid #E4E4E4;
    border-radius: 4px;
}

.efp-success-icon {
    margin-bottom: 24px;
}

.efp-success-icon svg {
    display: inline-block;
    animation: efp-scale-in 0.5s ease;
}

.efp-success-title {
    font-size: 24px;
    font-weight: 700;
    color: #10B981;
    margin-bottom: 12px;
}

.efp-success-text {
    font-size: 16px;
    color: #646970;
    margin-bottom: 0;
}

/* Loading Overlay */
.efp-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
    border-radius: 4px;
}

.efp-loading-overlay p {
    margin-top: 16px;
    font-size: 16px;
    color: #646970;
}

/* Spinner */
.efp-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #E4E4E4;
    border-top-color: #C9252C;
    border-radius: 50%;
    animation: efp-spin 0.8s linear infinite;
}

/* Animations */
@keyframes efp-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes efp-scale-in {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .efp-steps-indicator {
        gap: 16px;
    }
    
    .efp-step-connector {
        width: 60px;
    }
    
    .efp-radio-group {
        gap: 16px;
    }
}

/* Korean Privacy Consent Checkboxes */
.efp-kr-consent {
    margin-top: 8px;
}

.efp-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.efp-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.5;
}
.efp-checkbox-label a
{
    color: #0043ff;
}
.efp-checkbox-label a:hover
{
    color: #c9252c;
}

.efp-checkbox-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.efp-checkbox-custom {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1.5px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    transition: border-color 0.2s, background 0.2s;
}

.efp-checkbox-input:checked + .efp-checkbox-custom {
    background: var(--color-primary, #1d4ed8);
    border-color: var(--color-primary, #1d4ed8);
}

.efp-checkbox-input:checked + .efp-checkbox-custom::after {
    content: '';
    display: block;
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
}

.efp-checkbox-text {
    font-size: 14px;
    color: #374151;
}

.efp-checkbox-text strong {
    color: #111827;
}

.efp-kr-consent-error {
    color: #dc2626;
    font-size: 13px;
    margin-top: 4px;
}
