/**
 * MLP Form Builder Widget Styles
 *
 * @package MyLandingPageThemeChild
 * @since 2.0.0
 */

/* ==========================================================================
   Base Wrapper
   ========================================================================== */

.mlp-form-builder-wrapper {
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

/* ==========================================================================
   Color Schemes
   ========================================================================== */

/* Primary Schema (auf hellem Hintergrund) */
.mlp-form-builder--primary .mlp-form-builder-button,
.mlp-form-builder--primary button[type="submit"],
.mlp-form-builder--primary .submit-button {
    background-color: var(--e-global-color-primary, #093050);
    color: var(--e-global-color-secondary, #FFFFFF);
}

.mlp-form-builder--primary .mlp-form-builder-button:hover,
.mlp-form-builder--primary button[type="submit"]:hover,
.mlp-form-builder--primary .submit-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Secondary Schema (auf Primary/dunklem Hintergrund) */
.mlp-form-builder--secondary .mlp-form-builder-button,
.mlp-form-builder--secondary button[type="submit"],
.mlp-form-builder--secondary .submit-button {
    background-color: var(--e-global-color-accent, #5C7A7A);
    color: var(--e-global-color-secondary, #FFFFFF);
}

.mlp-form-builder--secondary .mlp-form-builder-button:hover,
.mlp-form-builder--secondary button[type="submit"]:hover,
.mlp-form-builder--secondary .submit-button:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ==========================================================================
   Demo Mode Badge
   ========================================================================== */

.mlp-form-builder-demo-badge {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mlp-form-builder--demo {
    position: relative;
}

/* ==========================================================================
   Privacy Notice
   ========================================================================== */

.mlp-form-builder-privacy {
    font-size: 13px;
    color: inherit;
    opacity: 0.8;
    margin-top: 15px;
    line-height: 1.5;
    text-align: center;
}

.mlp-form-builder-privacy a {
    color: inherit;
    text-decoration: underline;
    transition: opacity 0.2s;
}

.mlp-form-builder-privacy a:hover {
    opacity: 0.7;
}

/* Auf dunklem Hintergrund */
.mlp-form-builder--secondary .mlp-form-builder-privacy {
    color: var(--e-global-color-text, #FCFCFC);
}

/* ==========================================================================
   Placeholder (Editor Only)
   ========================================================================== */

.mlp-form-builder-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    text-align: center;
}

.mlp-form-builder-placeholder .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #64748b;
    margin-bottom: 10px;
}

.mlp-form-builder-placeholder p {
    margin: 0 0 5px;
    font-size: 15px;
    color: #334155;
}

.mlp-form-builder-placeholder small {
    font-size: 12px;
    color: #94a3b8;
}

/* ==========================================================================
   Error State
   ========================================================================== */

.mlp-form-builder-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #fef2f2;
    border: 2px dashed #fecaca;
    border-radius: 8px;
    text-align: center;
}

.mlp-form-builder-error .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #ef4444;
    margin-bottom: 10px;
}

.mlp-form-builder-error p {
    margin: 0;
    font-size: 14px;
    color: #991b1b;
}

/* ==========================================================================
   Debug Info
   ========================================================================== */

.mlp-form-builder-debug {
    padding: 15px;
    background: #e7f3ff;
    border: 1px solid #0073aa;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 12px;
    font-family: 'Monaco', 'Consolas', monospace;
}

.mlp-form-builder-debug strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}

.mlp-form-builder-debug code {
    display: block;
    background: transparent;
    padding: 2px 0;
    color: #1e40af;
}

/* ==========================================================================
   Demo Form Styles
   ========================================================================== */

.mlp-demo-form {
    max-width: 400px;
    margin: 0 auto;
}

.mlp-demo-form-field {
    margin-bottom: 15px;
}

.mlp-demo-form-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.mlp-demo-form-field input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
    transition: border-color 0.2s;
}

.mlp-demo-form-field input:focus {
    outline: none;
    border-color: var(--e-global-color-primary, #093050);
}

.mlp-demo-form-button {
    width: 100%;
    padding: 14px 20px;
    background: var(--e-global-color-primary, #093050);
    color: var(--e-global-color-secondary, #fff);
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.7;
    transition: all 0.2s;
}

.mlp-form-builder--secondary .mlp-demo-form-button {
    background: var(--e-global-color-accent, #5C7A7A);
}

/* ==========================================================================
   Demo Calendar Styles
   ========================================================================== */

.mlp-demo-calendar {
    max-width: 350px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mlp-demo-calendar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1e293b;
}

.mlp-demo-calendar-header .dashicons {
    color: var(--e-global-color-primary, #093050);
}

.mlp-demo-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 15px;
}

.mlp-demo-calendar-day {
    padding: 10px;
    text-align: center;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 14px;
    color: #475569;
    transition: all 0.2s;
}

.mlp-demo-calendar-day.active {
    background: var(--e-global-color-primary, #093050);
    color: #fff;
}

.mlp-demo-calendar-info {
    font-size: 13px;
    color: #64748b;
    text-align: center;
    margin: 0;
}

/* ==========================================================================
   Demo Products Styles
   ========================================================================== */

.mlp-demo-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.mlp-demo-product {
    padding: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    transition: box-shadow 0.2s;
}

.mlp-demo-product:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mlp-demo-product-image {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 8px;
    margin: 0 auto 15px;
}

.mlp-demo-product h4 {
    margin: 0 0 5px;
    font-size: 16px;
    color: #1e293b;
}

.mlp-demo-product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--e-global-color-primary, #093050);
    margin: 0 0 15px;
}

.mlp-demo-product-button {
    width: 100%;
    padding: 10px;
    background: var(--e-global-color-primary, #093050);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: not-allowed;
    opacity: 0.7;
}

.mlp-form-builder--secondary .mlp-demo-product-button {
    background: var(--e-global-color-accent, #5C7A7A);
}

/* ==========================================================================
   Demo Custom HTML Styles
   ========================================================================== */

.mlp-demo-custom {
    padding: 40px 20px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    text-align: center;
}

.mlp-demo-custom .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: #64748b;
    margin-bottom: 10px;
}

.mlp-demo-custom p {
    margin: 0 0 10px;
    font-size: 15px;
    color: #475569;
}

.mlp-demo-custom code {
    display: inline-block;
    padding: 10px 15px;
    background: #1e293b;
    color: #94a3b8;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Monaco', 'Consolas', monospace;
}

/* ==========================================================================
   Products Module
   ========================================================================== */

.mlp-form-builder--products {
    /* Specific styles for product module */
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    .mlp-demo-products {
        grid-template-columns: 1fr;
    }

    .mlp-demo-calendar {
        padding: 15px;
    }

    .mlp-demo-calendar-grid {
        gap: 3px;
    }

    .mlp-demo-calendar-day {
        padding: 8px 5px;
        font-size: 12px;
    }

    .mlp-form-builder-placeholder,
    .mlp-form-builder-error {
        padding: 30px 15px;
    }
}

/* ==========================================================================
   Form Integration Overrides
   ========================================================================== */

/* KlickTipp / Quentn Forms */
.mlp-form-builder-wrapper .kt-form-container,
.mlp-form-builder-wrapper .qtn-form-container {
    max-width: 100%;
}

/* Calendly Embed */
.mlp-form-builder-wrapper .calendly-inline-widget {
    min-height: 650px;
}

/* eTermin Embed */
.mlp-form-builder-wrapper .etermin-container {
    width: 100%;
}

/* Custom iFrame */
.mlp-form-builder-wrapper iframe {
    max-width: 100%;
    border: none;
}

/* ==========================================================================
   Elementor Editor Styles
   ========================================================================== */

.elementor-editor-active .mlp-form-builder-placeholder {
    background: #fff3cd;
    border-color: #ffc107;
}

.elementor-editor-active .mlp-form-builder-placeholder .dashicons {
    color: #856404;
}

.elementor-editor-active .mlp-form-builder-placeholder p {
    color: #856404;
}
