/* A2HS Floating Button */
.a2hs-float {
    position: fixed;
    right: 0;
    bottom: 7rem;
    z-index: 20;
    cursor: pointer;
    transition: all 0.3s ease;
}

.a2hs-close-float {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 100;
    cursor: pointer;
    transition: all 0.2s ease;
}

.a2hs-close-float:hover {
    background: #f0f0f0;
    color: #000;
    transform: scale(1.1);
}

.a2hs-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: fit-content;
    height: fit-content;
    padding: 12px 10px;
    background: #6889b7;
    border-radius: 15px 0 0 15px;
    color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3)
}

/* 官網主站專用配色 (淺灰) */
.a2hs-box.is-main {
    background: #f1f2f6;
    color: #000000;
    padding-bottom: 5px;
}

.a2hs-box img {
    width: 40px;
    height: auto;
    margin-bottom: 2px;
}

.a2hs-box span {
    font-size: 14px;
    transform: scale(0.9);
    white-space: nowrap;
    padding-top: 2px;
}

.a2hs-float:hover {
    transform: translateY(-5px);
}

body.has-footer-ad .a2hs-float {
    bottom: 8rem;
}

body.has-float-ad .a2hs-float {
    bottom: 11.75rem;
}

/* A2HS Modal (支援 iOS 引導與其他平台確認窗) */
.a2hs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.a2hs-modal-content {
    background: #fff;
    width: 90%;
    max-width: 450px;
    padding: 35px 25px;
    border-radius: 16px;
    position: relative;
    text-align: center;
    animation: a2hsPopIn 0.3s ease-out;
}

@keyframes a2hsPopIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.a2hs-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    color: #999;
    background: none;
    border: none;
    padding: 5px;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.a2hs-close:hover {
    color: #666;
    transform: rotate(90deg);
}

.a2hs-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
}

.a2hs-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.a2hs-modal h3 {
    color: #00479d;
    margin-bottom: 10px;
    font-weight: 600;
}

.instruction-steps {
    text-align: left;
    margin: 20px 0;
    padding: 0 10px;
}

.step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

.step-text {
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

.step-num {
    margin-right: 5px;
    flex-shrink: 0;
    font-weight: 500;
}

.step-content {
    flex: 1;
}

.step-icon-bg {
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.a2hs-modal-btn {
    background: #00479d;
    color: #fff;
    border-radius: 25px;
    padding: 12px 40px;
    font-size: 16px;
    margin-top: 20px;
    width: 80%;
    cursor: pointer;
    transition: 0.5s;
    border: none;
}

.a2hs-modal-btn:hover {
    background: #1660cb;
    color: white;
}

/* Checkbox Style */
.a2hs-option {
    margin: 15px 0 5px;
    display: flex;
    justify-content: center;
}

.a2hs-checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    user-select: none;
}

.a2hs-checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #eee;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.a2hs-checkbox-container:hover input~.checkmark {
    background-color: #ccc;
}

.a2hs-checkbox-container input:checked~.checkmark {
    background-color: #00479d;
    border-color: #00479d;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.a2hs-checkbox-container input:checked~.checkmark:after {
    display: block;
}

.a2hs-checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

@media (max-width: 767px) {
    .a2hs-float {
        right: 0;
    }

    .a2hs-box {
        padding: 8px 6px;
        border-radius: 10px 0 0 10px;
    }

    .a2hs-box img {
        width: 35px;
    }

    .a2hs-box span {
        font-size: 12px;
    }
}