/* Nút Đăng Ký */
#daily-plugin-container {
    position: fixed !important;
    top: 500px; /* Initial fallback */
    left: 200px; /* Initial fallback */
    width: 180px !important;
    height: auto !important;
    max-width: 180px !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    border-radius: 14px !important;
    display: block !important;
    z-index: 9999999 !important;
    pointer-events: auto !important;
    cursor: grab !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
    -webkit-user-drag: none !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    outline: none !important;
    border: none !important;
    will-change: transform;
    touch-action: none !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    line-height: 0 !important;
}

#daily-plugin-container:active {
    cursor: grabbing;
}

/* Active drag state (triggered by long press on mobile) */
#daily-plugin-container.daily-drag-active {
    transform: scale(1.08);
    box-shadow: 0 8px 30px rgba(42, 6, 100, 0.4);
    z-index: 10000;
    transition: transform 0.1s ease;
    /* Smooth transition for entering drag state */
}

/* Instant feedback when touched but long press hasn't triggered yet */
#daily-plugin-container.daily-touch-press {
    transform: scale(0.95);
    opacity: 0.9;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

/* Drag indicator - subtle move icon on hover (desktop only) */
#daily-plugin-container::after {
    content: '⠿';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(42, 6, 100, 0.6);
    border-radius: 10px;
    padding: 1px 8px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    line-height: 1.2;
}

#daily-plugin-container:hover::after {
    opacity: 1;
}

.daily-modal-trigger {
    display: inline-block;
    cursor: pointer;
}

#daily-ads-box {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    pointer-events: none !important;
}

.daily-ads-content {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    outline: none !important;
    border: none !important;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
    pointer-events: none !important;
}

.daily-store-banner {
    width: 180px !important;
    height: auto !important;
    max-width: 100% !important;
    display: block !important;
    /* Kill inline space */
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 14px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    pointer-events: none !important;
    -webkit-user-drag: none !important;
    outline: none !important;
}

.daily-modal-trigger:focus .daily-store-banner,
.daily-modal-trigger:hover .daily-store-banner {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

/* Modal */
.daily-modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.65);
    overflow-y: auto;
    padding: 40px 16px;
}

.daily-modal-card {
    background-color: #ffffff;
    border-radius: 28px;
    max-width: 760px;
    margin: 0 auto;
    padding: 42px 56px 48px;
    position: relative;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.35);
    animation: dailyModalSlide 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling for iOS */
}

@keyframes dailyModalSlide {
    from {
        transform: translateY(-40px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.daily-modal-close {
    position: absolute;
    top: 22px;
    right: 26px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #2a0664;
    font-size: 30px;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.daily-modal-close:hover,
.daily-modal-close:focus {
    background: rgba(42, 6, 100, 0.12);
    color: #2a0664;
}

.popup-reg-agency {
    text-align: center;
}

.popup-reg-agency .title-box h2 {
    font-size: 42px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #2a0664;
    margin-bottom: 20px;
}

.daily-modal-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 16px;
}

.daily-divider-line {
    width: 60px;
    height: 3px;
    background: #2a0664;
    display: inline-block;
}

.daily-divider-icon img {
    width: 28px;
    height: auto;
}

.daily-divider-dot {
    width: 14px;
    height: 14px;
    background: #2a0664;
    border-radius: 50%;
    display: inline-block;
}

.desc-reg-agency {
    font-size: 16px;
    font-style: italic;
    color: #d1810a;
    margin-bottom: 32px;
}

.daily-modal-form .wpcf7-form {
    text-align: left;
}

.daily-modal-form .wpcf7-form p {
    margin-bottom: 16px;
}

.daily-modal-form .wpcf7-form input[type=text],
.daily-modal-form .wpcf7-form input[type=tel],
.daily-modal-form .wpcf7-form input[type=email],
.daily-modal-form .wpcf7-form input[type=number],
.daily-modal-form .wpcf7-form textarea,
.daily-modal-form .wpcf7-form select {
    width: 100%;
    padding: 14px 18px;
    background: #f6f1e4;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    color: #6c757d;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.daily-modal-form .wpcf7-form input:focus,
.daily-modal-form .wpcf7-form textarea:focus,
.daily-modal-form .wpcf7-form select:focus {
    border: 1px solid #2a0664;
    box-shadow: 0 0 0 3px rgba(42, 6, 100, 0.18);
    outline: none;
}

.daily-modal-form .wpcf7-form ::placeholder {
    color: #a0a6ad;
    opacity: 1;
}

.daily-modal-form .wpcf7-form .wpcf7-list-item {
    margin: 0;
}

.daily-modal-form .wpcf7-form .wpcf7-acceptance {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.daily-modal-form .wpcf7-form .wpcf7-acceptance label {
    font-size: 15px;
    color: #2b2b2b;
    font-weight: 500;
}

.daily-modal-form .wpcf7-form .daily-terms-link,
.daily-modal-form .wpcf7-form .btn-terms {
    display: inline-block;
    background: #d1810a;
    color: #fff;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 18px;
}

.daily-modal-form .wpcf7-submit {
    background: linear-gradient(135deg, #2a0664 0%, #4a1a9e 100%);
    color: #fff;
    padding: 16px 32px;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    min-width: 180px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin: 20px auto 0;
    box-shadow: 0 10px 25px rgba(42, 6, 100, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.daily-modal-form .wpcf7-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 24px rgba(42, 6, 100, 0.35);
}

.daily-modal-feedback {
    margin-top: 18px;
    font-weight: 600;
    color: #2a0664;
    text-align: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.daily-modal-feedback.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.daily-plugin-form-warning {
    color: #c0392b;
    font-weight: 600;
}

/* Custom Checkbox Style */
.daily-modal-form .vs-custom-checkbox {
    margin-bottom: 16px;
}

.daily-modal-form .vs-custom-checkbox input[type="checkbox"] {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #f6f1e4;
    border: 2px solid #2a0664;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin: 0;
}

.daily-modal-form .vs-custom-checkbox input[type="checkbox"]:checked {
    background-color: #2a0664;
    border-color: #2a0664;
}

.daily-modal-form .vs-custom-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
}

.daily-modal-form .vs-custom-checkbox input[type="checkbox"]:hover {
    border-color: #2a0664;
    box-shadow: 0 0 0 3px rgba(42, 6, 100, 0.1);
}

.daily-modal-form .vs-custom-checkbox input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(42, 6, 100, 0.2);
}

.daily-modal-form .vs-custom-checkbox label {
    position: relative;
    padding-left: 36px;
    cursor: pointer;
    font-size: 18px;
    user-select: none;
    font-weight: 800;
    font-family: var(--vs-title-font, inherit);
    color: var(--vs-white-color, #ffffff);
    text-transform: capitalize;
    margin: 0;
}

/* Responsive tweaks */
@media (max-width: 1024px) {
    .daily-store-banner {
        width: 240px;
    }

    .daily-modal-card {
        padding: 38px 34px 40px;
        max-width: 640px;
        max-height: calc(100vh - 80px);
    }
}

@media (max-width: 768px) {
    .daily-modal-card {
        padding: 30px 26px 34px;
        max-width: 500px;
    }

    .popup-reg-agency .title-box h2 {
        font-size: 34px;
    }
}

@media (max-width: 480px) {
    .daily-store-banner {
        width: 140px !important;
        height: auto !important;
    }

    #daily-plugin-container {
        width: 110px !important;
        max-height: none !important;
        overflow: visible !important;
        border-radius: 12px !important;
    }

    .daily-modal-card {
        padding: 30px 20px;
        border-radius: 24px;
        max-height: calc(100vh - 40px);
        margin: 10px;
    }

    .popup-reg-agency .title-box h2 {
        font-size: 24px;
        letter-spacing: 1.5px;
        margin-bottom: 12px;
    }

    .daily-modal-divider {
        margin-bottom: 12px;
    }

    .desc-reg-agency {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .daily-modal-close {
        font-size: 24px;
        top: 10px;
        right: 12px;
        width: 32px;
        height: 32px;
    }
}

/* Footer Banner Shortcode */
.daily-footer-banner-wrapper {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
    overflow: hidden;
}

/* Đường cong đỏ nằm đè lên phần trên của hình */
.daily-footer-banner-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -40px;
    /* đẩy lên trên để cong đè lên ảnh */
    height: 120px;
    background: #ff0f7b;
    /* màu đỏ/đỏ hồng */
    border-bottom-left-radius: 50% 100%;
    border-bottom-right-radius: 50% 100%;
    z-index: 2;
}

.daily-footer-banner {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}