/* Dog-Haus Marketing - Rueckruf-Popup */

.dhm-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 30, 40, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.dhm-popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.dhm-popup-container {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 40px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateY(20px) scale(0.97);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #263238;
}

.dhm-popup-overlay.is-open .dhm-popup-container {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.dhm-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.92);
    color: #263238;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, transform 0.2s ease;
}

.dhm-popup-close:hover {
    background: #ffffff;
    transform: rotate(90deg);
}

.dhm-popup-hero {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #263238;
}

.dhm-popup-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 55% 55%;
    display: block;
}

.dhm-popup-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.35) 100%);
    pointer-events: none;
}

.dhm-popup-body {
    padding: 22px 28px 26px;
    overflow-y: auto;
}

.dhm-popup-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 5px 12px;
    border-radius: 0 !important;
    margin-bottom: 10px;
}

.dhm-popup-overlay .dhm-popup-submit,
.dhm-popup-overlay .dhm-popup-close,
.dhm-popup-overlay .dhm-form-field input,
.dhm-popup-overlay .dhm-form-field textarea,
.dhm-popup-overlay .dhm-popup-error {
    border-radius: 0 !important;
}

.dhm-popup-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4caf50;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    animation: dhm-pulse 1.8s infinite;
}

@keyframes dhm-pulse {
    0%   { box-shadow: 0 0 0 0   rgba(76, 175, 80, 0.6); }
    70%  { box-shadow: 0 0 0 10px rgba(76, 175, 80, 0); }
    100% { box-shadow: 0 0 0 0   rgba(76, 175, 80, 0); }
}

.dhm-popup-title {
    margin: 0 0 6px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    color: #1b5e20;
}

.dhm-popup-subtitle {
    margin: 0 0 10px;
    font-size: 15px;
    color: #558b2f;
    font-weight: 600;
}

.dhm-popup-text {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.55;
    color: #455a64;
}

.dhm-popup-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dhm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.dhm-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dhm-form-field label {
    font-size: 12.5px;
    font-weight: 600;
    color: #455a64;
}

.dhm-form-field label span {
    color: #c62828;
}

.dhm-form-field input,
.dhm-form-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #cfd8dc;
    border-radius: 0;
    font-size: 14px;
    color: #263238;
    background: #fafafa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.dhm-form-field textarea {
    resize: vertical;
    min-height: 56px;
}

.dhm-form-field input:focus,
.dhm-form-field textarea:focus {
    outline: none;
    border-color: #689f38;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(104, 159, 56, 0.18);
}

.dhm-form-field input.is-invalid,
.dhm-form-field textarea.is-invalid {
    border-color: #e53935;
    background: #ffebee;
}

.dhm-popup-error {
    background: #ffebee;
    color: #c62828;
    padding: 10px 14px;
    border-radius: 0;
    font-size: 13px;
    border-left: 3px solid #e53935;
}

.dhm-popup-submit {
    position: relative;
    background: linear-gradient(135deg, #66bb6a 0%, #388e3c 100%);
    color: #ffffff;
    border: none;
    padding: 14px 20px;
    border-radius: 0;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 6px 16px rgba(56, 142, 60, 0.35);
    letter-spacing: 0.02em;
    overflow: hidden;
    font-family: inherit;
}

.dhm-popup-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(56, 142, 60, 0.45);
    filter: brightness(1.05);
}

.dhm-popup-submit:active:not(:disabled) {
    transform: translateY(0);
}

.dhm-popup-submit:disabled {
    cursor: wait;
    opacity: 0.85;
}

.dhm-popup-submit.is-loading .dhm-popup-submit-label {
    opacity: 0;
}

.dhm-popup-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    margin-left: -9px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    opacity: 0;
    animation: dhm-spin 0.8s linear infinite;
}

.dhm-popup-submit.is-loading .dhm-popup-spinner {
    opacity: 1;
}

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

.dhm-popup-footnote {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 0;
    font-size: 11.5px;
    color: #78909c;
    line-height: 1.4;
}

.dhm-popup-footnote svg {
    flex-shrink: 0;
    color: #689f38;
}

.dhm-popup-success {
    text-align: center;
    padding: 20px 10px 10px;
}

.dhm-popup-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
}

.dhm-popup-success-icon svg {
    width: 100%;
    height: 100%;
    animation: dhm-pop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dhm-pop {
    0%   { transform: scale(0.2); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}

.dhm-popup-success h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #2e7d32;
}

.dhm-popup-success p {
    margin: 0;
    font-size: 15px;
    color: #455a64;
    line-height: 1.5;
}

/* Mobile */
@media (max-width: 540px) {
    .dhm-popup-container {
        max-width: 100%;
    }
    .dhm-popup-body {
        padding: 18px 18px 20px;
    }
    .dhm-popup-title {
        font-size: 20px;
    }
    .dhm-form-row {
        grid-template-columns: 1fr;
    }
    .dhm-popup-hero {
        height: 210px;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .dhm-popup-overlay,
    .dhm-popup-container,
    .dhm-popup-submit,
    .dhm-popup-close {
        transition: none !important;
    }
    .dhm-popup-dot,
    .dhm-popup-spinner,
    .dhm-popup-success-icon svg {
        animation: none !important;
    }
}
