/**
 * Vormerken (Watchlist) Modal Styles
 */

/* CSS Variables */
:root {
    --immo-primary: #000080;
    --immo-accent: #DA2424;
    --immo-black: #000000;
    --immo-white: #ffffff;
}

/* Heart Icon on Property Cards */
.immo-favorite-heart {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.immo-favorite-heart:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.immo-favorite-heart .material-symbols-outlined {
    font-size: 20px;
    color: #fff;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    transition: all 0.3s ease;
}

.immo-favorite-heart:hover .material-symbols-outlined {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    color: #fff;
}

/* Heart Icon in Grid - Same height as badge */
.immo-grid-image .immo-favorite-heart,
.immo-grid-shortcode .immo-grid-image .immo-favorite-heart {
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.immo-grid-image .immo-favorite-heart .material-symbols-outlined,
.immo-grid-shortcode .immo-grid-image .immo-favorite-heart .material-symbols-outlined {
    font-size: 16px;
}

.immo-grid-image .immo-favorite-heart:hover,
.immo-grid-shortcode .immo-grid-image .immo-favorite-heart:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Adjust Highlight Badge position when heart is present */
.immo-grid-image .immo-favorite-heart ~ .immo-grid-badge,
.immo-grid-shortcode .immo-grid-image .immo-favorite-heart ~ .immo-grid-badge {
    right: 50px;
}

/* Adjust Highlight Badge in Archive when heart is present */
.immo-listing-image .immo-favorite-heart ~ .immo-listing-featured {
    right: 50px;
}

/* Heart Icon in Archive/Listing Cards - Same size as grid */
.immo-listing-image .immo-favorite-heart {
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.immo-listing-image .immo-favorite-heart .material-symbols-outlined {
    font-size: 16px;
}

.immo-listing-image .immo-favorite-heart:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Adjust Archive/Listing Status Badge to match Grid size */
.immo-listing-status {
    padding: 6px 14px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
}

/* Modal Overlay */
.immo-vormerken-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.immo-vormerken-modal.active {
    display: flex;
}

.immo-vormerken-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

/* Modal Container */
.immo-vormerken-container {
    position: relative;
    background: #fff;
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
    z-index: 1;
}

/* Close Button */
.immo-vormerken-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.immo-vormerken-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

.immo-vormerken-close .material-symbols-outlined {
    font-size: 24px;
    color: #333;
}

/* Content */
.immo-vormerken-content {
    padding: 40px 40px 40px;
}

.immo-vormerken-icon {
    text-align: center;
    margin-bottom: 20px;
}

.immo-vormerken-icon img {
    width: 75px;
    height: 75px;
    object-fit: contain;
    animation: scaleIn 0.6s ease;
}

.immo-vormerken-icon .material-symbols-outlined {
    font-size: 64px;
    color: var(--immo-accent);
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
    animation: heartBeat 1.5s ease infinite;
}

.immo-vormerken-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin: 0 0 16px;
    line-height: 1.3;
}

.immo-vormerken-description {
    font-size: 16px;
    color: #666;
    text-align: center;
    line-height: 1.6;
    margin: 0 0 32px;
}

/* Form Styles */
.immo-vormerken-form .immo-form-group {
    margin-bottom: 24px;
}

/* Name/Email Row - 50/50 on Desktop */
.immo-vormerken-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Additional Fields Container */
.immo-additional-fields {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    animation: slideDown 0.3s ease;
}

#immo-common-fields {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
    animation: slideDown 0.3s ease;
}

.immo-criteria-title {
    margin: 0 0 20px 0;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--immo-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.immo-criteria-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--immo-primary);
    border-radius: 2px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.optional-label {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

/* Select fields styling */
.immo-vormerken-form select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    color: #333;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.immo-vormerken-form select:focus {
    outline: none;
    border-color: var(--immo-primary);
    box-shadow: 0 0 0 4px rgba(0, 0, 128, 0.1);
}

.immo-vormerken-form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.immo-vormerken-form input[type="text"],
.immo-vormerken-form input[type="email"],
.immo-vormerken-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    color: #333;
    transition: all 0.3s ease;
    font-family: inherit;
}

.immo-vormerken-form input:focus,
.immo-vormerken-form textarea:focus {
    outline: none;
    border-color: var(--immo-primary);
    box-shadow: 0 0 0 4px rgba(0, 0, 128, 0.1);
}

.immo-vormerken-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* Checkbox Group - Desktop 4 Columns */
.immo-checkbox-group {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.immo-checkbox-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 12px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: center;
}

.immo-checkbox-label:hover {
    background: #f0f0f0;
    border-color: var(--immo-primary);
}

.immo-checkbox-label input[type="checkbox"] {
    display: none;
}

.immo-checkbox-label:has(input:checked) {
    background: var(--immo-primary);
    border-color: var(--immo-primary);
    color: #fff;
}

/* DSGVO Checkbox */
.immo-form-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 13px;
    color: #666;
    font-weight: 400;
    cursor: pointer;
}

.immo-form-checkbox input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--immo-primary);
    flex-shrink: 0;
}

.immo-form-checkbox a {
    color: var(--immo-primary);
    text-decoration: underline;
}

/* Submit Button */
.immo-form-actions {
    margin-top: 32px;
}

.immo-vormerken-submit {
    width: 100%;
    padding: 16px 32px;
    background: var(--immo-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 128, 0.3);
}

.immo-vormerken-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 128, 0.4);
    background: #000070;
}

.immo-vormerken-submit:active {
    transform: translateY(0);
}

.immo-vormerken-submit .material-symbols-outlined {
    font-size: 20px;
}

/* Message Display */
.immo-vormerken-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    font-size: 14px;
    text-align: center;
}

.immo-vormerken-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.immo-vormerken-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Success State */
.immo-vormerken-success {
    text-align: center;
    padding: 40px 20px;
}

.immo-success-icon {
    margin-bottom: 24px;
}

.immo-success-icon .material-symbols-outlined {
    font-size: 80px;
    color: #000080;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
    animation: scaleIn 0.5s ease;
}

.immo-vormerken-success h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 16px;
}

.immo-vormerken-success p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 32px;
}

.immo-vormerken-close-success {
    padding: 14px 32px;
    background: #000080;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.immo-vormerken-close-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Trigger Buttons */
.immo-vormerken-trigger-button {
    padding: 14px 28px;
    background: var(--immo-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 128, 0.3);
}

.immo-vormerken-trigger-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 128, 0.4);
    background: #000070;
}

.immo-vormerken-trigger-link {
    background: none;
    border: none;
    color: var(--immo-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    text-decoration: none;
    transition: all 0.3s ease;
}

.immo-vormerken-trigger-link:hover {
    color: #000070;
    gap: 12px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .immo-vormerken-container {
        border-radius: 20px 20px 0 0;
        max-height: 95vh;
        margin-top: auto;
    }
    
    .immo-vormerken-content {
        padding: 50px 24px 24px;
    }
    
    .immo-vormerken-title {
        font-size: 24px;
    }
    
    .immo-vormerken-description {
        font-size: 15px;
    }
    
    .immo-vormerken-icon img {
        width: 75px;
        height: 75px;
    }
    
    /* Stack form row on mobile */
    .immo-vormerken-form-row {
        grid-template-columns: 1fr;
    }
    
    /* Stack checkbox group on mobile */
    .immo-checkbox-group {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .immo-checkbox-label {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .immo-favorite-heart {
        width: 32px;
        height: 32px;
        top: 16px;
        right: 16px;
    }
    
    .immo-favorite-heart .material-symbols-outlined {
        font-size: 18px;
    }
}

/* Loading State */
.immo-vormerken-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.immo-vormerken-submit.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

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

/* Inline Form Shortcode */
.immo-vormerken-inline-form {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.immo-inline-form {
    display: grid;
    grid-template-columns: 40% 60%;
    align-items: center;
    gap: 12px;
}

.immo-inline-input {
    padding: 14px 20px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    color: #333;
    transition: all 0.3s ease;
    font-family: inherit;
}

.immo-inline-submit {
    grid-column: 1 / -1;
}

.immo-inline-input:focus {
    outline: none;
    border-color: var(--immo-primary);
    box-shadow: 0 0 0 4px rgba(0, 0, 128, 0.1);
}

.immo-inline-input::placeholder {
    color: #999;
}

.immo-inline-submit {
    padding: 0px;
    background: transparent;
    color: var(--immo-primary);
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    white-space: nowrap;
}

.immo-inline-submit:hover {
    color: #000070;
    gap: 12px;
}

.immo-inline-submit .material-symbols-outlined {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.immo-inline-submit:hover .material-symbols-outlined {
    transform: translateX(4px);
}

/* Responsive Inline Form */
@media (max-width: 768px) {
    .immo-inline-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .immo-inline-submit {
        width: 100%;
        justify-content: center;
    }
}

/* Signup Form Shortcode (Variation 2) */
.immo-vormerken-signup-form {
    width: 100%;
    max-width: 100%;
}

.immo-signup-form {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.immo-signup-input {
    flex: 1;
    padding: 16px 24px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #333;
    font-family: inherit;
}

.immo-signup-input:first-of-type {
    border-right: 1px solid #e0e0e0;
}

.immo-signup-input:focus {
    outline: none;
}

.immo-signup-input::placeholder {
    color: #999;
}

.immo-signup-submit {
    padding: 16px 32px;
    background: var(--immo-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.immo-signup-submit:hover {
    background: #000070;
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(0, 0, 128, 0.3);
}

.immo-signup-submit:active {
    transform: translateX(0);
}

/* Responsive Signup Form */
@media (max-width: 768px) {
    .immo-signup-form {
        flex-direction: column;
        border-radius: 20px;
        padding: 8px;
        gap: 8px;
    }
    
    .immo-signup-input {
        padding: 14px 20px;
        border-radius: 12px;
        background: #f8f8f8;
    }
    
    .immo-signup-input:first-of-type {
        border-right: none;
    }
    
    .immo-signup-submit {
        width: 100%;
        padding: 14px 24px;
        border-radius: 12px;
    }
}
