/**
 * Floating Buttons & Bottom Consultation Bar
 */

/* ========================================
   Floating Buttons (우측 하단)
   ======================================== */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9990;
    transition: bottom 0.3s ease, top 0.3s ease, transform 0.3s ease;
}

.floating-buttons.with-bar {
    bottom: 180px;
}

.floating-btn {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}

.floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
}

.floating-btn:active {
    transform: translateY(-1px);
}

/* 카카오톡 버튼 */
.floating-btn.kakao {
    background: #FEE500;
}

.floating-btn.kakao i {
    font-size: 26px;
    color: #3C1E1E;
}

.floating-btn.kakao .floating-btn-text {
    color: #3C1E1E;
}

/* 전화 버튼 */
.floating-btn.phone {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.floating-btn.phone i {
    font-size: 24px;
    color: white;
}

.floating-btn.phone .floating-btn-text {
    color: white;
}

/* 버튼 텍스트 */
.floating-btn-text {
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: -0.3px;
	    margin-top: -6px; /* 이 줄 추가 */
}

/* ========================================
   Bottom Consultation Bar (하단 고정)
   ======================================== */
.consultation-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    padding: 12px 20px;
    z-index: 9980;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}
.consultation-bar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.consultation-bar-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    min-width: 70px;
}

.consultation-bar-title span {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.consultation-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.consultation-input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 13px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.consultation-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.consultation-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.15);
}

.consultation-select {
    min-width: 160px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.consultation-select option {
    background: #1e40af;
    color: white;
}

.consultation-privacy {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    white-space: nowrap;
    cursor: pointer;
}

.consultation-privacy input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.consultation-privacy a {
    color: #fbbf24;
    text-decoration: underline;
}

.consultation-submit {
    padding: 10px 24px;
    background: #ffffff;
    color: #2563eb;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.consultation-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4);
}

.consultation-submit:disabled {
    opacity: 0.6;
    color:#333;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ========================================
   Privacy Modal
   ======================================== */
.privacy-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.privacy-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.privacy-modal {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.privacy-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.privacy-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
}

.privacy-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #666;
    transition: background 0.2s ease;
}

.privacy-modal-close:hover {
    background: #eee;
}

.privacy-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

.privacy-modal-body h4 {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 20px 0 10px;
}

.privacy-modal-body h4:first-child {
    margin-top: 0;
}

.privacy-modal-body ul {
    margin: 10px 0;
    padding-left: 20px;
}

.privacy-modal-body li {
    margin-bottom: 6px;
}

.privacy-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: center;
}

.privacy-modal-footer .btn {
    min-width: 120px;
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 1024px) {
    .consultation-bar-container {
        flex-wrap: wrap;
    }
    
    .consultation-bar-title {
        width: 100%;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .consultation-bar-title span {
        display: inline;
    }
    
    .consultation-form {
        flex-wrap: wrap;
    }
    
    .consultation-input {
        flex: 1 1 calc(50% - 5px);
        min-width: 120px;
    }
    
    .consultation-select {
        flex: 1 1 100%;
    }
    
    .consultation-privacy {
        flex: 1 1 100%;
        justify-content: flex-start;
    }
    
    .consultation-submit {
        flex: 1 1 100%;
    }
}

@media (max-width: 768px) {
    /* 모바일: 화면 중앙 우측에 배치 */
    .floating-buttons {
        right: 16px;
        bottom: auto;
        top: 50%;
        transform: translateY(calc(-50% + 70px)); /* 4개 버튼 중 아래쪽 2개 */
        gap: 10px;
    }
    
    .floating-buttons.with-bar {
        bottom: auto;
        top: 50%;
        transform: translateY(calc(-50% + 70px));
    }
    
    .floating-btn {
        width: 60px;
        height: 60px;
        border-radius: 14px;
    }
    
    .floating-btn.kakao i,
    .floating-btn.phone i {
        font-size: 22px;
    }
    
    .floating-btn-text {
        font-size: 10px;
    }
    
    .consultation-bar {
        padding: 10px 16px;
    }
    
    .consultation-bar-title {
        font-size: 13px;
    }
    
    .consultation-input,
    .consultation-select {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .consultation-privacy {
        font-size: 11px;
    }
    
    .consultation-submit {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .floating-buttons {
        right: 12px;
        bottom: auto;
        top: 50%;
        transform: translateY(calc(-50% + 66px));
    }
    
    .floating-buttons.with-bar {
        bottom: auto;
        top: 50%;
        transform: translateY(calc(-50% + 66px));
    }
    
    .floating-btn {
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }
    
    .floating-btn.kakao i,
    .floating-btn.phone i {
        font-size: 20px;
    }
    
    .floating-btn-text {
        font-size: 9px;
    }
    
    .consultation-bar {
        padding: 10px 12px;
    }
    
    .consultation-input {
        flex: 1 1 100%;
    }
    
    .consultation-select {
        min-width: 100%;
    }
}

/* ========================================
   RTL Support (Arabic)
   ======================================== */
   /*
[data-lang="ar"] .floating-buttons {
    right: auto;
    left: 20px;
}

@media (max-width: 768px) {
    [data-lang="ar"] .floating-buttons {
        left: 16px;
    }
}

@media (max-width: 480px) {
    [data-lang="ar"] .floating-buttons {
        left: 12px;
    }
}

[data-lang="ar"] .consultation-select {
    background-position: left 12px center;
    padding-right: 14px;
    padding-left: 36px;
}*/

/* Footer spacing adjustment */
.footer {
    padding-bottom: 80px;
}

@media (max-width: 768px) {
    .footer {
        padding-bottom: 200px;
    }
}

/* ========================================
   Small Height Screens (폴더폰 등)
   ======================================== */
@media (max-height: 700px) and (max-width: 768px) {
    .floating-buttons {
        gap: 6px;
    }
    
    .floating-btn {
        width: 48px;
        height: 48px;
        border-radius: 10px;
    }
    
    .floating-btn.kakao i,
    .floating-btn.phone i {
        font-size: 18px;
    }
    
    .floating-btn-text {
        font-size: 9px;
    }
}

@media (max-height: 600px) and (max-width: 768px) {
    .floating-buttons {
        gap: 4px;
    }
    
    .floating-btn {
        width: 44px;
        height: 44px;
        border-radius: 8px;
    }
    
    .floating-btn.kakao i,
    .floating-btn.phone i {
        font-size: 16px;
    }
    
    .floating-btn-text {
        font-size: 8px;
    }
}