/* Popup Form Styles */

/* Modal Overlay */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(35, 35, 35, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Popup Container */
.popup-container {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.popup-overlay.active .popup-container {
    transform: scale(1) translateY(0);
}

/* Close Button */
.popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(110, 110, 110, 0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.popup-close:hover {
    background-color: var(--theme-color);
    transform: rotate(90deg);
}

.popup-close svg {
    width: 20px;
    height: 20px;
    stroke: var(--title-color);
    transition: all 0.3s ease;
}

.popup-close:hover svg {
    stroke: #ffffff;
}

/* Popup Content */
.popup-content {
    position: relative;
    padding: 50px 40px 40px;
}

.popup-content h2 {
    font-size: 32px;
    line-height: 42px;
    font-weight: 600;
    color: var(--title-color);
    margin-bottom: 10px;
    text-align: center;
}

.popup-content .subtitle {
    font-size: 16px;
    line-height: 24px;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 30px;
}

/* Form Styles */
.popup-form .form-group {
    position: relative;
    display: block;
    margin-bottom: 20px;
}

.popup-form .form-group label {
    position: relative;
    display: block;
    font-size: 16px;
    line-height: 19px;
    font-weight: 500;
    color: var(--title-color);
    margin-bottom: 8px;
}

.popup-form .form-group label span {
    color: #ff0000;
}

.popup-form .form-group input[type='text'],
.popup-form .form-group input[type='email'],
.popup-form .form-group input[type='tel'],
.popup-form .form-group input[type='url'],
.popup-form .form-group select {
    position: relative;
    display: block;
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1px solid rgba(110, 110, 110, 0.3);
    font-size: 16px;
    color: var(--text-color);
    padding: 10px 20px;
    transition: all 0.3s ease;
    font-family: var(--text-font);
    background-color: #ffffff;
}

.popup-form .form-group select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    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='%236E6E6E' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    padding-right: 45px;
}

.popup-form .form-group input:focus,
.popup-form .form-group select:focus {
    border: 1px solid var(--theme-color);
    outline: none;
}

.popup-form .form-group input::placeholder {
    color: rgba(110, 110, 110, 0.5);
}

/* Phone Input Wrapper */
.popup-form .phone-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.popup-form .phone-input-wrapper .country-code-select {
    flex: 0 0 130px;
    min-width: 130px;
}

.popup-form .phone-input-wrapper input[type='tel'] {
    flex: 1;
}

/* Submit Button */
.popup-form .submit-btn {
    position: relative;
    display: inline-block;
    overflow: hidden;
    width: 100%;
    margin-top: 10px;
}

.popup-form .submit-btn button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
    line-height: 26px;
    font-weight: 500;
    color: var(--title-color);
    padding: 20px 32px;
    border-radius: 8px;
    background-color: var(--theme-color);
    border: none;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
}

.popup-form .submit-btn button:hover {
    background-color: var(--secondary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(160, 224, 13, 0.3);
}

/* Trigger Button Styles */
.popup-trigger-btn {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.popup-trigger-btn .static-text {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
    line-height: 26px;
    font-weight: 500;
    color: var(--title-color);
    padding: 10px 32px;
    border-radius: 8px;
    background-color: var(--theme-color);
    transition: all 0.3s ease;
}

.popup-trigger-btn:hover .static-text {
    transform: translateY(-101%);
}

.popup-trigger-btn .overlay-text {
    position: absolute;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
    line-height: 26px;
    font-weight: 500;
    color: #ffffff;
    padding: 20px 32px;
    border-radius: 8px;
    background-color: var(--secondary-color);
    transform: translateY(100%);
    transition: all 0.5s ease;
}

.popup-trigger-btn:hover .overlay-text {
    transform: translateY(0%);
}

/* Contact Panel */
.contact-panel {
    position: fixed;
    bottom: 80px;
    right: 16px;
    z-index: 9999;
    background: #1e1e1e;
    border-radius: 10px;
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 160px;
}

.contact-panel.show {
    display: flex;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.contact-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.contact-option svg {
    flex-shrink: 0;
}

/* Floating Trigger Button */
.floating-popup-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
    background-image: linear-gradient(312deg, #232323 41.04%, #313131 73.86%);
    border-radius: 999px;
    padding: 12px;
    font-size: 0.7rem;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    width: 50px;
    height: 50px;
}

.floating-popup-btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.floating-popup-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

/* Responsive Styles */
@media only screen and (max-width: 767px) {
    .popup-content {
        padding: 40px 25px 30px;
    }

    .popup-content h2 {
        font-size: 26px;
        line-height: 34px;
    }

    .popup-form .form-group input[type='text'],
    .popup-form .form-group input[type='email'],
    .popup-form .form-group input[type='tel'],
    .popup-form .form-group input[type='url'],
    .popup-form .form-group select {
        font-size: 14px;
    }

    /* Keep phone input horizontal on mobile - country code left, phone number right */
    .popup-form .phone-input-wrapper {
        display: flex;
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }

    .popup-form .phone-input-wrapper .country-code-select {
        flex: 0 0 110px;
        min-width: 110px;
        max-width: 110px;
    }

    .popup-form .phone-input-wrapper input[type='tel'] {
        flex: 1;
        width: auto;
    }

    .popup-form .submit-btn button {
        font-size: 16px;
        padding: 18px 28px;
    }

    .floating-popup-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }

    .floating-popup-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media only screen and (max-width: 480px) {
    .popup-content h2 {
        font-size: 22px;
        line-height: 30px;
    }

    .popup-content .subtitle {
        font-size: 14px;
    }
}

/* Scrollbar Styles for Popup */
.popup-container::-webkit-scrollbar {
    width: 6px;
}

.popup-container::-webkit-scrollbar-track {
    background-color: rgba(110, 110, 110, 0.1);
    border-radius: 10px;
}

.popup-container::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: var(--theme-color);
}

.popup-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--secondary-color);
}

/* Prevent body scroll when popup is open */
body.popup-open {
    overflow: hidden;
}

/* Thank You Screen */
.popup-thank-you {
    display: none;
    text-align: center;
    padding: 60px 40px;
}

.popup-thank-you.active {
    display: block;
}

.popup-thank-you .success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background-color: var(--theme-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: scaleIn 0.5s ease;
}

.popup-thank-you .success-icon svg {
    width: 40px;
    height: 40px;
    stroke: #ffffff;
    stroke-width: 3;
}

.popup-thank-you h2 {
    font-size: 32px;
    line-height: 42px;
    font-weight: 600;
    color: var(--title-color);
    margin-bottom: 16px;
}

.popup-thank-you p {
    font-size: 18px;
    line-height: 28px;
    color: var(--text-color);
    margin-bottom: 30px;
}

.popup-thank-you .close-btn-wrapper {
    margin-top: 40px;
}

.popup-thank-you .close-btn-wrapper button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 18px;
    line-height: 26px;
    font-weight: 500;
    color: #ffffff;
    padding: 20px 40px;
    border-radius: 8px;
    background-color: var(--secondary-color);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.popup-thank-you .close-btn-wrapper button:hover {
    background-color: var(--theme-color);
    color: var(--title-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(160, 224, 13, 0.3);
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Hide form when thank you is shown */
.popup-form.hidden {
    display: none;
}

@media only screen and (max-width: 767px) {
    .popup-thank-you {
        padding: 40px 25px;
    }

    .popup-thank-you h2 {
        font-size: 26px;
        line-height: 34px;
    }

    .popup-thank-you p {
        font-size: 16px;
        line-height: 24px;
    }

    .popup-thank-you .success-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 25px;
    }

    .popup-thank-you .success-icon svg {
        width: 35px;
        height: 35px;
    }
}
