/* Popup overlay */
.services-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(34, 68, 103, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.services-popup-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

/* Popup container */
.services-popup-container {
    background: white;
    border-radius: 25px;
    max-width: 550px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

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

/* Popup header */
.services-popup-header {
    background: #224467;
    color: white;
    padding: 30px;
    border-radius: 25px 25px 0 0;
    position: relative;
}

.services-popup-header h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
}

.services-popup-header p {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

.services-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.services-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Form content */
.services-popup-content {
    padding: 35px;
}

/* Input fields */
.services-input-group {
    margin-bottom: 20px;
}

.services-input-group label {
    display: block;
    color: #224467;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.services-input-group label.required::after {
    content: ' *';
    color: #2fe0a5;
}

.services-input-group input,
.services-input-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    font-weight: 500;
    box-sizing: border-box;
}

.services-input-group input:focus,
.services-input-group textarea:focus {
    outline: none;
    border-color: #2fe0a5;
    box-shadow: 0 0 0 3px rgba(97, 206, 112, 0.1);
}

.services-input-group textarea {
    resize: vertical;
    min-height: 120px;
}

.services-input-group input::placeholder,
.services-input-group textarea::placeholder {
    color: #999;
}

/* GDPR consent */
.services-gdpr-consent {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.services-checkbox-item {
    display: flex;
    align-items: flex-start;
    position: relative;
}

.services-checkbox-item input[type="checkbox"] {
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #224467;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.services-checkbox-item input[type="checkbox"]:checked {
    background: #2fe0a5;
    border-color: #2fe0a5;
}

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

.services-checkbox-item label {
    margin-left: 12px;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    line-height: 1.6;
}

.services-checkbox-item + .services-checkbox-item {
    margin-top: 14px;
}

.services-checkbox-item label.required::after {
    content: ' *';
    color: #2fe0a5;
}

.services-checkbox-item label a {
    color: #224467;
    text-decoration: underline;
}

/* GDPR reassurance strip (shortcode gdpr_strip="yes") */
.services-popup-content .fininfo-gdpr-strip {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #F5F7FA;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 25px;
    font-size: 13px;
    line-height: 1.6;
    color: #4B5563;
}

.services-popup-content .fininfo-gdpr-strip strong {
    color: #224467;
}

.services-popup-content .fininfo-gdpr-strip__icon {
    flex-shrink: 0;
    line-height: 0;
}

/* Submit button */
.services-submit-btn {
    width: 100%;
    background: #2fe0a5;
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(97, 206, 112, 0.3);
}

.services-submit-btn:hover {
    background: #26c493;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(97, 206, 112, 0.4);
}

.services-submit-btn:active {
    transform: translateY(0);
}

.services-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success screen */
.services-success {
    display: none;
    padding: 35px;
    text-align: center;
    animation: slideUp 0.4s ease;
}

.services-success.show {
    display: block;
}

.services-success-icon {
    width: 70px;
    height: 70px;
    background: #2fe0a5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 6px 20px rgba(47, 224, 165, 0.4);
}

.services-success-icon svg {
    width: 36px;
    height: 36px;
    stroke: white;
    stroke-width: 2.5;
    fill: none;
}

.services-success h3 {
    font-size: 22px;
    font-weight: 700;
    color: #224467;
    margin: 0 0 14px;
    font-family: 'Montserrat', sans-serif;
}

.services-success p {
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    margin: 0 0 28px;
    font-family: 'Montserrat', sans-serif;
}

.services-success-close {
    background: #2fe0a5;
    color: #224467;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.services-success-close:hover {
    background: #26c493;
    transform: translateY(-2px);
}

/* Scrollbar styling */
.services-popup-container::-webkit-scrollbar {
    width: 8px;
}

.services-popup-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 25px 25px 0;
}

.services-popup-container::-webkit-scrollbar-thumb {
    background: #224467;
    border-radius: 10px;
}

.services-popup-container::-webkit-scrollbar-thumb:hover {
    background: #2fe0a5;
}

/* Responsive */
@media (max-width: 768px) {
    .services-popup-container {
        margin: 10px;
        border-radius: 20px;
    }

    .services-popup-header {
        padding: 25px 20px;
        border-radius: 20px 20px 0 0;
    }

    .services-popup-header h2 {
        font-size: 22px;
    }

    .services-popup-content {
        padding: 25px 20px;
    }

    .services-success {
        padding: 25px 20px;
    }

    .services-success h3 {
        font-size: 18px;
    }
}
