/* AI스타디메이트 서비스 개시 팝업 - 모바일용 */

/* 팝업 오버레이 */
.aiwrite-popup-overlay-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 40px 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.aiwrite-popup-overlay-mobile.show {
    opacity: 1;
}

/* 팝업 컨테이너 */
.aiwrite-popup-container-mobile {
    width: 85%;
    max-width: 300px;
    min-height: 250px;
    max-height: 90vh;
    position: relative;
    animation: popupSlideInMobile 0.4s ease-out;
}

@keyframes popupSlideInMobile {
    from {
        transform: translateY(-20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* 팝업 콘텐츠 */
.aiwrite-popup-content-mobile {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3498db, #5dade2);
    border-radius: 10px;
    color: white;
    position: relative;
    padding: 18px;
    box-shadow: 0 6px 24px rgba(52, 152, 219, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

/* 닫기 버튼 */
.aiwrite-popup-close-mobile {
    position: absolute;
    top: 8px;
    right: 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    touch-action: manipulation;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.aiwrite-popup-close-mobile:hover,
.aiwrite-popup-close-mobile:active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* 헤더 */
.aiwrite-popup-header-mobile h3 {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: bold;
    color: white;
    line-height: 1.3;
    padding-right: 30px;
    text-align: center;
}

.aiwrite-popup-subtitle-mobile {
    margin: 0;
    font-size: 12px;
    color: white;
    opacity: 0.9;
    line-height: 1.4;
    text-align: center;
}

/* 본문 */
.aiwrite-popup-body-mobile {
    margin: 12px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.aiwrite-popup-description-mobile {
    margin: 0 0 14px 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    color: #4a1e10;
    text-align: center;
}

/* 가격 표시 */
.aiwrite-popup-price-mobile {
    margin: 0;
    text-align: center;
}

.aiwrite-popup-price-main-mobile {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.aiwrite-popup-price-original-mobile {
    font-size: 11px;
    opacity: 0.8;
    color: #ffffff;
}

/* 푸터 */
.aiwrite-popup-footer-mobile {
    margin-top: auto;
}

.aiwrite-popup-buttons-mobile {
    text-align: center;
    margin-bottom: 12px;
}

.aiwrite-popup-btn-primary-mobile {
    display: inline-block;
    background: #ffffff;
    color: #3498db;
    padding: 10px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    touch-action: manipulation;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.aiwrite-popup-btn-primary-mobile:hover,
.aiwrite-popup-btn-primary-mobile:active {
    background: #f8f9fa;
    color: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* 옵션 영역 */
.aiwrite-popup-options-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10px;
}

.aiwrite-popup-checkbox-label-mobile {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    touch-action: manipulation;
}

.aiwrite-popup-checkbox-mobile {
    margin-right: 4px;
    transform: scale(1.0);
}

.aiwrite-popup-checkbox-text-mobile {
    color: #ecf0f1;
    font-size: 10px;
}

.aiwrite-popup-btn-close-mobile {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.aiwrite-popup-btn-close-mobile:hover,
.aiwrite-popup-btn-close-mobile:active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* 더 작은 화면 대응 */
@media (max-width: 320px) {
    .aiwrite-popup-container-mobile {
        width: 90%;
        max-width: 290px;
        min-height: 240px;
        max-height: 85vh;
    }
    
    .aiwrite-popup-content-mobile {
        padding: 16px;
    }
    
    .aiwrite-popup-header-mobile h3 {
        font-size: 14px;
    }
    
    .aiwrite-popup-description-mobile {
        font-size: 12px;
    }
    
    .aiwrite-popup-price-main-mobile {
        font-size: 15px;
    }
}

/* 터치 디바이스 최적화 */
@media (hover: none) and (pointer: coarse) {
    .aiwrite-popup-close-mobile {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }
    
    .aiwrite-popup-btn-primary-mobile {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .aiwrite-popup-btn-close-mobile {
        padding: 6px 10px;
        font-size: 11px;
    }
}