/* SmartContact Frontend Styles - Professional & Theme-Integrated */

/* Variables */
:root {
    --sc-bg-color: #ffffff;
    --sc-input-bg: #ffffff;
    --sc-input-border: #d1d5db;
    --sc-text-color: #313131;
    --sc-primary-color: #1e40af;
    --sc-primary-hover: #1e3a8a;
    --sc-error-color: #dc2626;
    --sc-radius: 4px;
    --sc-spacing: 1.25rem;
    --sc-font-size: 17px;
    /* Base desktop font size */
}

/* Container & Global Font Inheritance */
.smartcontact-form-container,
.smartcontact-form-container * {
    font-family: inherit !important;
    box-sizing: border-box;
}

.smartcontact-form-container {
    background-color: var(--sc-bg-color) !important;
    padding: 2.5rem;
    border: 1px solid #e0e0e0;
    border-radius: var(--sc-radius);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 650px;
    margin: 2rem auto;
    color: var(--sc-text-color);
    line-height: 1.6;
    font-size: var(--sc-font-size) !important;
    /* Apply base size */
}

/* Header */
.smartcontact-header {
    margin-bottom: 2.25rem;
    text-align: left;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 0.75rem;
}

.smartcontact-title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 !important;
}

/* Form Layout */
.smartcontact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.smartcontact-form-row {
    display: flex;
    gap: 1.5rem;
}

.smartcontact-form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}

/* Labels */
.smartcontact-label {
    font-size: 0.9em !important;
    /* Scale relative to base */
    font-weight: 700 !important;
    margin-bottom: 0.6rem !important;
    color: #374151 !important;
    display: block !important;
}

.smartcontact-required {
    color: var(--sc-error-color);
    margin-left: 3px;
}

/* Inputs, Textarea, Select */
.smartcontact-input,
.smartcontact-textarea,
.smartcontact-select {
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    background-color: var(--sc-input-bg) !important;
    border: 1px solid var(--sc-input-border) !important;
    border-radius: var(--sc-radius) !important;
    font-size: 1em !important;
    /* Scale relative to base */
    color: var(--sc-text-color) !important;
    transition: all 0.2s ease-in-out;
    background-image: none !important;
    box-shadow: none !important;
}

.smartcontact-input:focus,
.smartcontact-textarea:focus,
.smartcontact-select:focus {
    outline: none !important;
    border-color: var(--sc-primary-color) !important;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1) !important;
}

.smartcontact-input::placeholder,
.smartcontact-textarea::placeholder {
    color: #9ca3af !important;
}

.smartcontact-textarea {
    min-height: 150px !important;
    line-height: 1.5 !important;
    resize: vertical;
}

/* Select Wrapper & Arrow */
.smartcontact-select-wrapper {
    position: relative;
    width: 100%;
}

.smartcontact-select {
    padding-right: 2.5rem !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.smartcontact-select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236B7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Captcha - NO BACKGROUND */
.smartcontact-captcha-container {
    background-color: transparent !important;
    padding: 0 !important;
    border: none !important;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.smartcontact-captcha-question-section {
    font-weight: 700 !important;
    color: #1f2937 !important;
    font-size: 1.1em !important;
    /* Scale relative to base */
    padding: 0.5rem 0 !important;
    background: transparent !important;
    /* Explicitly transparent */
}

.smartcontact-captcha-input {
    width: 100px !important;
    text-align: center !important;
}

/* Privacy Consent - COMPULSORY VISUAL */
.smartcontact-consent-group {
    margin: 1rem 0 !important;
    padding: 0.5rem 0;
}

.smartcontact-consent-label {
    display: flex !important;
    align-items: center !important;
    gap: 0.85rem !important;
    font-size: 0.9em !important;
    /* Scale relative to base */
    color: #4b5563 !important;
    cursor: pointer !important;
}

.smartcontact-consent-label input[type="checkbox"] {
    width: 1.25rem !important;
    height: 1.25rem !important;
    margin: 0 !important;
    border: 2px solid var(--sc-primary-color) !important;
    /* Blue border to stand out */
    border-radius: 3px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.smartcontact-link {
    color: var(--sc-primary-color) !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
}

/* Submit Button - Polished */
.smartcontact-submit-btn {
    background-color: var(--sc-primary-color) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 1rem 2rem !important;
    border: none !important;
    border-radius: var(--sc-radius) !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    width: 100% !important;
    font-size: 1.1em !important;
    /* Scale relative to base */
    text-transform: none !important;
    letter-spacing: normal !important;
}

.smartcontact-submit-btn:hover {
    background-color: var(--sc-primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2) !important;
}

.smartcontact-btn-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.smartcontact-submit-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Messages */
.smartcontact-message-container {
    margin-top: 1.5rem;
}

.smartcontact-message {
    padding: 1rem;
    border-radius: var(--sc-radius);
    font-weight: 600;
    text-align: center;
}

.smartcontact-message.success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #10b981;
}

.smartcontact-message.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    :root {
        --sc-font-size: 15px;
        /* Mobile font size */
    }

    .smartcontact-form-container {
        padding: 1.5rem;
        margin: 1rem;
    }

    .smartcontact-form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
}