/* ===================================== */
/* CONSULT MODAL - SMARTPHONE DESIGN */
/* 상담문의 스마트폰 UI 스타일 */
/* ===================================== */

/* Phone Modal Specific */
.phone-modal {
    background: transparent;
    box-shadow: none;
    max-width: 400px;
}

/* Smartphone Frame */
.smartphone-frame {
    width: 360px;
    height: 720px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 12px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 2px #2a2a2a,
        inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    position: relative;
    margin: 0 auto;
}

.smartphone-frame::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 25px;
    background: #1a1a1a;
    border-radius: 0 0 15px 15px;
    z-index: 10;
}

/* Phone Screen */
.phone-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Status Bar */
.status-bar {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    padding: 8px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    height: 44px;
}

.status-icons {
    display: flex;
    gap: 8px;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.consultant-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.consultant-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.consultant-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.online-status {
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.online-status i {
    font-size: 0.5rem;
    color: #4ade80;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    background: #f5f7fa;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message-date {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    padding: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 12px;
    margin: 10px auto;
    max-width: fit-content;
}

.message {
    display: flex;
    flex-direction: column;
    max-width: 75%;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.message.received {
    align-self: flex-start;
}

.message.sent {
    align-self: flex-end;
}

.message-bubble {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.message.received .message-bubble {
    border-bottom-left-radius: 4px;
    border-left: 3px solid var(--accent-color);
}

.message.sent .message-bubble {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-color));
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing Indicator */
.typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
}

.typing span {
    width: 6px;
    height: 6px;
    background: #ccc;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.message-time {
    font-size: 0.7rem;
    color: var(--text-lighter);
    margin-top: 4px;
    padding: 0 8px;
}

/* Quick Replies */
.quick-replies {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}

.quick-reply-btn {
    background: white;
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.quick-reply-btn:hover {
    background: var(--accent-light);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-reply-btn i {
    font-size: 1rem;
}

/* Chat Input Area */
.chat-input-area {
    background: white;
    padding: 12px 15px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.attachment-btn,
.send-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--accent-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.attachment-btn:hover,
.send-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.chat-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

.chat-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Phone Home Button */
.phone-home-button {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* Close Button for Phone Modal */
.phone-modal .close-modal {
    position: absolute;
    top: -50px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
}

.phone-modal .close-modal:hover {
    background: white;
    transform: rotate(90deg);
}

/* Scrollbar for Chat Messages */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 480px) {
    .smartphone-frame {
        width: 95%;
        max-width: 360px;
        height: 650px;
    }
}