/* Frontend Styles for OSWP Contact Plugin - Professional Light Theme */

/* Form Wrapper */
.oswp-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Form Container */
.oswp-contact-form-form {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 40px;
    border: 1px solid #e0e5eb;
    transition: opacity 0.3s;
}

/* Fields Row - Flex Container */
.oswp-form-fields-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

/* Form Groups with Column Support */
.oswp-form-group {
    padding: 0 10px;
    margin-bottom: 24px;
    box-sizing: border-box;
}

/* Column Width Classes */
.oswp-col-full { flex: 0 0 100%; max-width: 100%; }
.oswp-col-half { flex: 0 0 50%; max-width: 50%; }
.oswp-col-third { flex: 0 0 33.333%; max-width: 33.333%; }
.oswp-col-two-thirds { flex: 0 0 66.666%; max-width: 66.666%; }

/* Labels */
.oswp-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 14px;
    letter-spacing: 0.2px;
}

.oswp-required {
    color: #ef4444;
    margin-left: 2px;
    font-weight: 700;
}

/* Input Fields */
.oswp-input,
.oswp-textarea,
.oswp-select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e0e5eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
    background: #ffffff;
    color: #1e293b;
}

.oswp-input::placeholder,
.oswp-textarea::placeholder {
    color: #94a3b8;
}

.oswp-input:focus,
.oswp-textarea:focus,
.oswp-select:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12);
}

.oswp-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* File Input */
.oswp-file-input {
    width: 100%;
    padding: 12px;
    border: 2px dashed #e0e5eb;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.oswp-file-input:hover {
    border-color: #25D366;
    background: #f0fdf4;
}

.oswp-file-info {
    font-size: 12px;
    color: #64748b;
    margin-top: 6px;
}

/* Field Description */
.oswp-field-description {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
    line-height: 1.4;
}

/* Radio and Checkbox Groups */
.oswp-radio-group,
.oswp-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.oswp-radio-label,
.oswp-checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1.5px solid #e0e5eb;
    background: #f8fafc;
    font-size: 14px;
}

.oswp-radio-label:hover,
.oswp-checkbox-label:hover {
    background-color: #f0fdf4;
    border-color: #25D366;
}

.oswp-radio-label input[type="radio"],
.oswp-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
    width: auto;
    accent-color: #25D366;
}

/* Submit Button */
.oswp-submit-group {
    margin-top: 28px;
    text-align: center;
    flex: 0 0 100%;
    max-width: 100%;
}

.oswp-submit-btn {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 15px 48px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.oswp-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.45);
}

.oswp-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.oswp-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* WhatsApp Icon in Button */
.oswp-wa-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Form Messages */
.oswp-form-message {
    margin-top: 24px;
    padding: 16px 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.oswp-form-message.oswp-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.oswp-form-message.oswp-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.oswp-msg-icon {
    font-size: 18px;
    font-weight: 700;
}

/* Error State */
.oswp-error-field {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Field Error Message */
.oswp-field-error-msg {
    display: block;
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

/* No Fields Message */
.oswp-no-fields {
    text-align: center;
    color: #64748b;
    padding: 40px 20px;
    font-style: italic;
}

/* Spinner */
.oswp-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: oswp-spin 0.6s linear infinite;
    vertical-align: middle;
}

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

/* Submitting State */
.oswp-submitting {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .oswp-form-wrapper {
        padding: 10px;
    }
    
    .oswp-contact-form-form {
        padding: 28px 20px;
    }
    
    .oswp-col-half,
    .oswp-col-third,
    .oswp-col-two-thirds {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .oswp-submit-btn {
        width: 100%;
        padding: 16px;
    }
}

@media screen and (max-width: 480px) {
    .oswp-contact-form-form {
        padding: 24px 16px;
        border-radius: 8px;
    }
    
    .oswp-input,
    .oswp-textarea,
    .oswp-select {
        font-size: 16px;
    }
    
    .oswp-form-group {
        padding: 0 5px;
        margin-bottom: 20px;
    }
    
    .oswp-form-fields-row {
        margin: 0 -5px;
    }
}

/* Accessibility */
.oswp-input:focus-visible,
.oswp-textarea:focus-visible,
.oswp-select:focus-visible {
    outline: 2px solid #25D366;
    outline-offset: 2px;
}
