/* ============================================
   SUBMISSION FORM - EXACT Brand Guidelines Match
   Completely isolated with unique class names
   ============================================ */

/* Brand Color Variables */
:root {
    --brand-green: #4A7C59;
    --brand-gold: #D4A017;
    --brand-cream: #F9F7F2;
    --brand-charcoal: #2C2C2C;
    --brand-error: #EF4444;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
}

/* Form Container - No background, displays directly on page */
.flaeske-submit-form-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px;
    background: transparent;
}

@media (min-width: 768px) {
    .flaeske-submit-form-wrapper {
        padding: 40px;
    }
}

/* Override ANY conflicting input styles from other CSS files - NO BLACK OUTLINES */
.flaeske-submit-form-wrapper input,
.flaeske-submit-form-wrapper select,
.flaeske-submit-form-wrapper textarea {
    outline: none !important;
    box-shadow: none !important;
}

/* Form Title */
.flaeske-submit-form-title {
    font-family: 'Merriweather', serif;
    font-size: 28px;
    font-weight: bold;
    color: var(--brand-charcoal);
    margin: 0 0 32px 0;
    text-align: center;
}

@media (min-width: 768px) {
    .flaeske-submit-form-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
}

/* Form Grid */
.flaeske-submit-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 32px;
}

@media (min-width: 600px) {
    .flaeske-submit-form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

/* Form Field - EXACT Brand Guidelines spacing */
.flaeske-submit-form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 32px;
}

.flaeske-submit-form-field:last-child {
    margin-bottom: 0;
}

/* Labels - EXACT Brand Guidelines: text-sm font-bold text-brand-charcoal mb-2 */
.flaeske-submit-form-label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: var(--brand-charcoal);
    margin-bottom: 8px;
    font-family: 'Lato', sans-serif;
}

/* Input Fields - EXACT Brand Guidelines: px-4 py-3 rounded-lg border border-gray-300 */
/* Using !important to override ANY conflicting CSS from other files */
.flaeske-submit-form-input,
.flaeske-submit-form-input[type="text"],
.flaeske-submit-form-input[type="email"],
.flaeske-submit-form-input[type="url"],
.flaeske-submit-form-input[type="number"],
.flaeske-submit-form-input[type="tel"] {
    width: 100% !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    border: 1px solid var(--gray-300) !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 14px !important;
    color: var(--brand-charcoal) !important;
    background: #fff !important;
    transition: box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
    height: 48px !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.flaeske-submit-form-input:focus,
.flaeske-submit-form-input[type="text"]:focus,
.flaeske-submit-form-input[type="email"]:focus,
.flaeske-submit-form-input[type="url"]:focus,
.flaeske-submit-form-input[type="number"]:focus,
.flaeske-submit-form-input[type="tel"]:focus {
    outline: none !important;
    border-color: var(--brand-green) !important;
    box-shadow: 0 0 0 1px var(--brand-green) !important;
}

/* Textarea - EXACT Brand Guidelines */
.flaeske-submit-form-textarea {
    width: 100% !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    border: 1px solid var(--gray-300) !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 14px !important;
    color: var(--brand-charcoal) !important;
    background: #fff !important;
    transition: box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
    resize: none !important;
    min-height: 100px !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

.flaeske-submit-form-textarea:focus {
    outline: none !important;
    border-color: var(--brand-green) !important;
    box-shadow: 0 0 0 1px var(--brand-green) !important;
}

/* Select Dropdown - EXACT Brand Guidelines: SAME padding as input, arrow positioned absolutely */
.flaeske-submit-form-select {
    width: 100% !important;
    padding: 12px 16px !important;
    padding-right: 40px !important;
    border-radius: 8px !important;
    border: 1px solid var(--gray-300) !important;
    font-family: 'Lato', sans-serif !important;
    font-size: 14px !important;
    color: var(--brand-charcoal) !important;
    background: #fff !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    cursor: pointer !important;
    transition: box-shadow 0.2s ease !important;
    box-sizing: border-box !important;
    height: 48px !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7' /%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 20px 20px !important;
}

.flaeske-submit-form-select:focus {
    outline: none !important;
    border-color: var(--brand-green) !important;
    box-shadow: 0 0 0 1px var(--brand-green) !important;
}

/* Checkbox Group - Grid layout for aligned columns and rows */
.flaeske-submit-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
    margin-top: 8px;
    margin-bottom: 0;
}

@media (min-width: 600px) {
    .flaeske-submit-checkbox-group {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (min-width: 768px) {
    .flaeske-submit-checkbox-group {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

/* Checkbox Item - EXACT Brand Guidelines: flex items-center gap-3 */
.flaeske-submit-checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: var(--brand-charcoal);
    transition: color 0.2s ease;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    width: auto;
    height: auto;
    text-align: left;
}

.flaeske-submit-checkbox-item:hover {
    color: var(--brand-green);
}

.flaeske-submit-checkbox-item span {
    font-weight: bold;
    color: inherit;
    transition: color 0.2s ease;
}

/* Custom Checkbox Input - EXACT Brand Guidelines: w-5 h-5 rounded border-gray-300 */
.flaeske-submit-checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid var(--gray-300);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    background: #fff;
    box-shadow: none;
    outline: none;
}

.flaeske-submit-checkbox-item input[type="checkbox"]:checked {
    background-color: var(--brand-green);
    border-color: var(--brand-green);
}

.flaeske-submit-checkbox-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.flaeske-submit-checkbox-item input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

/* Small Text Helper */
.flaeske-submit-form-help {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 6px;
    font-family: 'Lato', sans-serif;
}

/* Submit Button */
.flaeske-submit-form-button {
    width: 100%;
    padding: 14px 24px;
    background: var(--brand-green);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 8px;
}

.flaeske-submit-form-button:hover {
    background: #3a6346;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.flaeske-submit-form-button:active {
    transform: translateY(1px);
}

/* Error Messages */
.flaeske-submit-form-wrapper .flaeske-error {
    background: #fee;
    border: 1px solid var(--brand-error);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    color: var(--brand-error);
    font-family: 'Lato', sans-serif;
    font-size: 14px;
}

.flaeske-submit-form-wrapper .flaeske-error p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.flaeske-submit-form-wrapper .flaeske-error p::before {
    content: '';
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23EF4444'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
}

/* Success Messages - EXACT Brand Guidelines from forms.html */
.flaeske-submit-form-wrapper .flaeske-success {
    background: rgba(74, 124, 89, 0.1) !important;
    border: 1px solid rgba(74, 124, 89, 0.2) !important;
    border-radius: 8px !important;
    padding: 12px !important;
    margin-bottom: 24px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-family: 'Lato', sans-serif !important;
    flex-wrap: wrap !important;
}

.flaeske-submit-form-wrapper .flaeske-success::before {
    display: none !important;
    content: '' !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    font-size: 0 !important;
}

.flaeske-submit-form-wrapper .flaeske-success .flaeske-success-icon {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
    color: var(--brand-green) !important;
    stroke: var(--brand-green) !important;
    fill: none !important;
    display: block !important;
}

.flaeske-submit-form-wrapper .flaeske-success p {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: bold;
    color: var(--brand-charcoal);
    word-wrap: break-word;
    word-break: break-word;
}

.flaeske-submit-form-wrapper .flaeske-success .flaeske-reset-form-link {
    color: var(--brand-green);
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.flaeske-submit-form-wrapper .flaeske-success .flaeske-reset-form-link:hover {
    color: var(--brand-charcoal);
}

/* Responsive Success Message */
@media (max-width: 599px) {
    .flaeske-submit-form-wrapper .flaeske-success {
        padding: 10px;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .flaeske-submit-form-wrapper .flaeske-success .flaeske-success-icon {
        width: 18px;
        height: 18px;
    }
    
    .flaeske-submit-form-wrapper .flaeske-success p {
        font-size: 13px;
        flex-basis: 100%;
        margin-bottom: 8px;
    }
    
    .flaeske-submit-form-wrapper .flaeske-success .flaeske-reset-form-link {
        font-size: 13px;
        margin-left: 0;
        margin-top: 4px;
        flex-basis: 100%;
        text-align: left;
    }
}

/* Duplicate Results */
.flaeske-submit-duplicate-results {
    margin-top: 8px;
    padding: 12px;
    background: var(--brand-cream);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 13px;
}

.flaeske-submit-duplicate-results ul {
    margin: 0;
    padding-left: 20px;
}

.flaeske-submit-duplicate-results li {
    margin: 4px 0;
    color: var(--brand-charcoal);
}

/* Input Error State */
.flaeske-submit-form-input.error,
.flaeske-submit-form-select.error,
.flaeske-submit-form-textarea.error {
    border-color: var(--brand-error);
}

.flaeske-submit-form-input.error:focus,
.flaeske-submit-form-select.error:focus,
.flaeske-submit-form-textarea.error:focus {
    border-color: var(--brand-error);
    box-shadow: 0 0 0 1px var(--brand-error);
}

/* Mobile Responsive */
@media (max-width: 599px) {
    .flaeske-submit-form-wrapper {
        padding: 20px 16px;
    }
    
    .flaeske-submit-form-title {
        font-size: 24px;
        margin-bottom: 24px;
    }
    
    .flaeske-submit-form-grid {
        gap: 16px;
        margin-bottom: 24px;
    }
    
    .flaeske-submit-form-field {
        margin-bottom: 24px;
    }
    
    .flaeske-submit-checkbox-group {
        gap: 16px;
    }
}
