/**
 * Ninja Forms - Custom Wedding Theme Styling
 * Version: 1.0
 *
 * Tento soubor obsahuje vlastní CSS styling pro Ninja Forms
 * aby perfektně ladil s designem svatebního tématu.
 *
 * Použití: Po instalaci Ninja Forms přidejte tento CSS do:
 * Customizer → Additional CSS NEBO
 * functions.php jako samostatný enqueue_style
 */

/* ================================
   NINJA FORMS - WEDDING THEME STYLING
   ================================ */

/* Form Fields Container */
.nf-form-fields-required {
    font-family: 'Open Sans', sans-serif !important;
    font-size: 14px !important;
    color: #4169b1 !important;
    margin-bottom: 25px !important;
    font-style: italic !important;
}


.nf-form-cont h3 {
    font-family: 'Great Vibes', cursive;
    font-size: 42px;
    margin-bottom: 30px;
    text-align: center;
    color: #2c2c2c;
}

/* Form Field Wrapper */
.nf-field-container {
    margin-bottom: 25px !important;
}

/* Field Labels */
.nf-field-label label,
.nf-field-label .nf-label-span {
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 21px !important;
    color: #2c2c2c !important;
    font-weight: 600 !important;
    margin-bottom: 8px !important;
    display: block !important;
}

/* Required Asterisk */
.ninja-forms-req-symbol {
    color: #4169b1 !important;
    margin-left: 3px !important;
}

/* Text Inputs, Textarea, Select */
.nf-field-element input[type="text"],
.nf-field-element input[type="email"],
.nf-field-element input[type="tel"],
.nf-field-element input[type="number"],
.nf-field-element input[type="password"],
.nf-field-element input[type="url"],
.nf-field-element textarea,
.nf-field-element select {
    width: 100% !important;
    padding: 12px 15px !important;
    border: 2px solid #e6f0ff !important;
    border-radius: 10px !important;
    font-family: 'Open Sans', sans-serif !important;
    font-size: 17px !important;
    transition: border-color 0.3s ease !important;
    background: white !important;
    color: #2c2c2c !important;
    box-sizing: border-box !important;
}

/* Focus State */
.nf-field-element input[type="text"]:focus,
.nf-field-element input[type="email"]:focus,
.nf-field-element input[type="tel"]:focus,
.nf-field-element input[type="number"]:focus,
.nf-field-element input[type="password"]:focus,
.nf-field-element input[type="url"]:focus,
.nf-field-element textarea:focus,
.nf-field-element select:focus {
    outline: none !important;
    border-color: #4169b1 !important;
    box-shadow: 0 0 0 3px rgba(65, 105, 177, 0.1) !important;
}

/* Textarea Specific */
.nf-field-element textarea {
    min-height: 100px !important;
    resize: vertical !important;
}

/* Select Dropdown */
.nf-field-element select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234169b1' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    padding-right: 40px !important;
    cursor: pointer !important;
}

/* Radio Buttons */
.nf-field-element input[type="radio"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    flex-shrink: 0 !important;
    border: 2px solid #e6f0ff !important;
    border-radius: 50% !important;
    outline: none !important;
    cursor: pointer !important;
    position: relative !important;
    vertical-align: middle !important;
    margin-right: 10px !important;
    transition: all 0.3s ease !important;
}

.nf-field-element input[type="radio"]:checked {
    border-color: #4169b1 !important;
    background: #4169b1 !important;
}

.nf-field-element input[type="radio"]:checked::after {
    content: '' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 8px !important;
    height: 8px !important;
    background: white !important;
    border-radius: 50% !important;
}

/* Radio/Checkbox Label */
.nf-field-element .nf-field-label label {
    cursor: pointer !important;
    display: inline-block !important;
    font-weight: normal !important;
}

/* List Container (for radio/checkbox groups) */
.nf-field-element ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.nf-field-element ul li {
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
}

/* Checkboxes */
.nf-field-element input[type="checkbox"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    flex-shrink: 0 !important;
    border: 2px solid #e6f0ff !important;
    border-radius: 4px !important;
    outline: none !important;
    cursor: pointer !important;
    position: relative !important;
    vertical-align: middle !important;
    margin-right: 10px !important;
    transition: all 0.3s ease !important;
}

.nf-field-element input[type="checkbox"]:checked {
    border-color: #4169b1 !important;
    background: #4169b1 !important;
}

.nf-field-element input[type="checkbox"]:checked::after {
    content: '✓' !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 14px !important;
    font-weight: bold !important;
}

/* Error Messages */
.nf-error-msg,
.nf-error .ninja-forms-field {
    border-color: #dc3545 !important;
}

.nf-error-msg {
    color: #dc3545 !important;
    font-size: 14px !important;
    margin-top: 5px !important;
    font-family: 'Open Sans', sans-serif !important;
}

.nf-error-wrap .nf-error-msg {
    display: block !important;
    padding: 8px 12px !important;
    background: rgba(220, 53, 69, 0.1) !important;
    border-radius: 5px !important;
    margin-top: 8px !important;
}

/* Submit Button */
.nf-form-cont .submit-container input[type="button"],
.nf-form-cont .submit-container input[type="submit"],
.nf-form-cont .submit-container button {
    padding: 15px 40px !important;
    background: #4169b1 !important;
    color: white !important;
    border: none !important;
    border-radius: 30px !important;
    font-family: 'Cormorant Garamond', serif !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: auto !important;
    display: inline-block !important;
    box-shadow: 0 5px 20px rgba(65, 105, 177, 0.2) !important;
}

.nf-form-cont .submit-container input[type="button"]:hover,
.nf-form-cont .submit-container input[type="submit"]:hover,
.nf-form-cont .submit-container button:hover {
    background: #2c4a7c !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(65, 105, 177, 0.3) !important;
}

/* Submit Container Alignment */
.nf-form-cont .submit-container {
    text-align: center !important;
    margin-top: 30px !important;
}

/* Success Message */
.nf-form-cont .nf-response-msg {
    padding: 20px 25px !important;
    border-radius: 10px !important;
    margin-bottom: 25px !important;
    font-family: 'Open Sans', sans-serif !important;
    font-size: 16px !important;
}

.nf-form-cont .nf-response-msg.nf-success {
    background: rgba(40, 167, 69, 0.1) !important;
    border-left: 4px solid #28a745 !important;
    color: #155724 !important;
}

.nf-form-cont .nf-response-msg.nf-error {
    background: rgba(220, 53, 69, 0.1) !important;
    border-left: 4px solid #dc3545 !important;
    color: #721c24 !important;
}

/* Loading/Processing State */
.nf-form-cont.nf-processing .nf-form-fields {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

.nf-loading-spinner {
    border: 3px solid #e6f0ff !important;
    border-top: 3px solid #4169b1 !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    animation: spin 1s linear infinite !important;
    margin: 20px auto !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Help Text / Description */
.nf-field-description {
    font-size: 14px !important;
    color: #666 !important;
    margin-top: 5px !important;
    font-style: italic !important;
    font-family: 'Open Sans', sans-serif !important;
}

/* Placeholders */
.nf-field-element input::placeholder,
.nf-field-element textarea::placeholder,
.nf-field-element select::placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
    font-style: italic !important;
}

/* Placeholder pro všechny prohlížeče */
.nf-field-element input::-webkit-input-placeholder,
.nf-field-element textarea::-webkit-input-placeholder,
.nf-field-element select::-webkit-input-placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
    font-style: italic !important;
}

.nf-field-element input::-moz-placeholder,
.nf-field-element textarea::-moz-placeholder,
.nf-field-element select::-moz-placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
    font-style: italic !important;
}

.nf-field-element input:-ms-input-placeholder,
.nf-field-element textarea:-ms-input-placeholder,
.nf-field-element select:-ms-input-placeholder {
    color: #6c757d !important;
    opacity: 1 !important;
    font-style: italic !important;
}

/* Two Column Layout Support */
.nf-form-cont .nf-field-container.two-col-first,
.nf-form-cont .nf-field-container.two-col-second {
    width: 48% !important;
    display: inline-block !important;
    vertical-align: top !important;
}

.nf-form-cont .nf-field-container.two-col-first {
    margin-right: 4% !important;
}

/* Date Picker (if using Ninja Forms date field) */
.nf-field-element input[type="date"] {
    cursor: pointer !important;
}

/* File Upload */
.nf-field-element input[type="file"] {
    padding: 10px !important;
    border: 2px dashed #e6f0ff !important;
    border-radius: 10px !important;
    background: rgba(230, 240, 255, 0.3) !important;
    cursor: pointer !important;
}

.nf-field-element input[type="file"]:hover {
    border-color: #4169b1 !important;
    background: rgba(65, 105, 177, 0.05) !important;
}

/* reCAPTCHA Styling */
.nf-field-element .g-recaptcha {
    margin: 20px 0 !important;
}

/* ================================
   RESPONSIVE - MOBILE & TABLET
   ================================ */

@media (max-width: 968px) {
    .nf-form-cont {
        padding: 30px 20px !important;
    }

    .nf-field-element input[type="text"],
    .nf-field-element input[type="email"],
    .nf-field-element input[type="tel"],
    .nf-field-element input[type="number"],
    .nf-field-element textarea,
    .nf-field-element select {
        font-size: 16px !important;
    }

    .nf-form-cont .submit-container input[type="button"],
    .nf-form-cont .submit-container input[type="submit"],
    .nf-form-cont .submit-container button {
        font-size: 17px !important;
        padding: 14px 35px !important;
    }

    /* Force single column on mobile */
    .nf-form-cont .nf-field-container.two-col-first,
    .nf-form-cont .nf-field-container.two-col-second {
        width: 100% !important;
        display: block !important;
        margin-right: 0 !important;
    }
}

@media (max-width: 640px) {
    .nf-form-cont {
        padding: 25px 15px !important;
        border-radius: 15px !important;
    }

    .nf-field-label label,
    .nf-field-label .nf-label-span {
        font-size: 18px !important;
    }

    .nf-field-element input[type="text"],
    .nf-field-element input[type="email"],
    .nf-field-element input[type="tel"],
    .nf-field-element input[type="number"],
    .nf-field-element textarea,
    .nf-field-element select {
        font-size: 16px !important;
        padding: 11px 14px !important;
    }

    .nf-form-cont .submit-container input[type="button"],
    .nf-form-cont .submit-container input[type="submit"],
    .nf-form-cont .submit-container button {
        font-size: 16px !important;
        padding: 13px 30px !important;
        width: 100% !important;
    }
}

/* ================================
   CONDITIONAL LOGIC - SMOOTH TRANSITIONS
   ================================ */

.nf-field-container {
    transition: opacity 0.3s ease, max-height 0.3s ease !important;
}

.nf-field-container.nf-hidden {
    opacity: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ================================
   CUSTOM ADDITIONS
   ================================ */

/* Optional: Add decorative icon before form title */
.nf-form-title {
    font-family: 'Great Vibes', cursive !important;
    font-size: 42px !important;
    text-align: center !important;
    margin-bottom: 30px !important;
    color: #2c2c2c !important;
}

/* Optional: Style for form sections/dividers */
.nf-field-element hr {
    border: none !important;
    border-top: 2px solid #e6f0ff !important;
    margin: 30px 0 !important;
}

/* ================================
   CUSTOM CONDITIONAL LOGIC CLASSES
   (Pro JavaScript podmíněnou logiku)
   ================================ */

/* Skrytá pole - používáno JavaScriptem */
.nf-field-container.nf-conditional-hidden {
    display: none !important;
    opacity: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Zobrazená pole - plynulý přechod */
.nf-field-container.nf-conditional-visible {
    display: block !important;
    opacity: 1 !important;
    max-height: 1000px !important;
    transition: opacity 0.3s ease, max-height 0.3s ease !important;
}

.list-checkbox-wrap .nf-field-element li label, .list-image-wrap .nf-field-element li label, .list-radio-wrap .nf-field-element li label {
    text-align: left;
}