/* SLIMHOST Chat - Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f5f5;
    overflow-x: hidden;
    max-width: 100vw;
}

@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
}

.chat-header {
    background: #c42127;
    color: white;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chat-header.active {
    display: flex;
}

.chat-header-title {
    font-size: 15px;
    font-weight: 600;
}

.chat-header-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.chat-header-close:hover {
    background: rgba(255,255,255,0.3);
}

#pageLang {
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 4px;
    background: rgba(255,255,255,0.95);
    color: #333;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

#pageLang:hover {
    background: white;
    border-color: rgba(255,255,255,0.5);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #e5ddd5;
}

.message {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.manager {
    align-items: flex-start;
}

.message-bubble {
    max-width: 70%;
    padding: 8px 12px;
    border-radius: 8px;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: #dcf8c6;
    border-bottom-right-radius: 2px;
}

.message.manager .message-bubble {
    background: white;
    border-bottom-left-radius: 2px;
}

.message-time {
    font-size: 11px;
    color: #667781;
    margin-top: 3px;
    padding: 0 5px;
}

.greeting-form {
    padding: 10px 20px 15px 20px;
    max-width: 500px;
    width: 100%;
    margin: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.greeting-form h2 {
    text-align: center;
    color: #c42127;
    margin-bottom: 6px;
    margin-top: 0;
    font-size: 22px;
}

@media (max-width: 768px) {
    .greeting-form {
        padding: 20px 15px;
        margin: 10px;
        max-width: 100%;
        width: calc(100% - 20px);
    }
    
    .greeting-form h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .greeting-form {
        padding: 15px 10px;
        margin: 5px;
        width: calc(100% - 10px);
        border-radius: 6px;
    }
    
    .greeting-form h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }
}

.info-notice {
    background: #fff3cd;
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.3;
    border-left: 4px solid #c42127;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #c42127;
}

.captcha-box {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    text-align: center;
}

.captcha-simple {
    text-align: center;
}

#captchaCanvas {
    display: block;
    margin: 10px auto;
    background: white;
    border-radius: 4px;
}

.captcha-refresh {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
    cursor: pointer;
}

.captcha-input {
    width: 100%;
    max-width: 200px;
    padding: 10px;
    margin: 10px auto;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
}

.captcha-error {
    color: #c42127;
    margin-top: 8px;
    font-weight: 600;
    font-size: 13px;
}

.btn-primary {
    width: 100%;
    padding: 10px;
    background: #c42127;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 5px;
}

.btn-primary:hover {
    background: #a01c21;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .info-notice {
        font-size: 12px;
        padding: 10px;
        margin-bottom: 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 4px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px;
        font-size: 14px;
    }
    
    .btn-primary {
        padding: 12px;
        font-size: 15px;
    }
    
    .captcha-box {
        padding: 12px;
        margin: 12px 0;
    }
    
    #captchaCanvas {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .info-notice {
        font-size: 11px;
        padding: 8px;
    }
    
    .form-group input,
    .form-group select {
        padding: 8px;
        font-size: 13px;
    }
    
    .captcha-input {
        max-width: 150px;
        padding: 8px;
        font-size: 14px;
    }
}

.offline-notice {
    padding: 40px 20px;
    max-width: 500px;
    width: 100%;
    margin: auto;
    text-align: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.offline-notice h2 {
    color: #c42127;
    margin-bottom: 20px;
    font-size: 24px;
    word-wrap: break-word;
}

.offline-notice p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.offline-notice .email {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 6px;
    margin: 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #c42127;
    word-break: break-all;
    overflow-wrap: break-word;
}

@media (max-width: 768px) {
    .offline-notice {
        padding: 30px 15px;
        margin: 10px;
        max-width: 100%;
        width: calc(100% - 20px);
    }
    
    .offline-notice h2 {
        font-size: 20px;
    }
    
    .offline-notice .email {
        font-size: 16px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .offline-notice {
        padding: 20px 10px;
        margin: 5px;
        width: calc(100% - 10px);
        border-radius: 6px;
    }
    
    .offline-notice h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .offline-notice p {
        font-size: 14px;
    }
    
    .offline-notice .email {
        font-size: 14px;
        padding: 10px;
        word-break: break-all;
    }
}

.loading-check {
    text-align: center;
    padding: 40px;
    color: #666;
}

@media (max-width: 768px) {
    .loading-check {
        padding: 30px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .loading-check {
        padding: 20px 10px;
        font-size: 13px;
    }
}

.chat-input-area {
    background: #f0f0f0;
    padding: 10px 15px;
    display: none;
    align-items: center;
    gap: 10px;
    border-top: 1px solid #ddd;
}

.chat-input-area.active {
    display: flex;
}

.chat-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-attach-btn {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    display: inline-block;
    font-size: 12px;
    color: #666;
    transition: all 0.2s;
    text-align: center;
}

.file-attach-btn:hover {
    background: #f5f5f5;
    border-color: #c42127;
    color: #c42127;
}

.file-preview {
    background: white;
    border-radius: 6px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.file-preview img {
    max-height: 50px;
    border-radius: 4px;
}

.file-remove {
    background: #c42127;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 12px;
    margin-left: auto;
}

.message-file img {
    max-width: 200px;
    border-radius: 8px;
    margin-top: 5px;
    cursor: pointer;
}

.chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 15px;
    resize: none;
    font-family: inherit;
    background: white;
}

.chat-input:focus {
    outline: none;
    border-color: #c42127;
}

.chat-send {
    padding: 10px 20px;
    background: #c42127;
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
}

.chat-send:hover {
    background: #a01c21;
}

.chat-send:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.hidden {
    display: none !important;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 10px 20px;
}

/* Mobile adaptivity */
@media (max-width: 768px) {
    .message-bubble {
        max-width: 85%;
        font-size: 14px;
    }
    
    .greeting-form {
        padding: 20px 15px;
        margin: 10px;
    }
    
    .chat-input-area {
        flex-wrap: wrap;
    }
    
    .close-chat-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .chat-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .file-attach-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .message-bubble {
        max-width: 90%;
    }
    
    .greeting-form h2 {
        font-size: 20px;
    }
    
    .offline-notice h2 {
        font-size: 20px;
    }
    
    .offline-notice .email {
        font-size: 16px;
    }
}
/* Updated Tue Apr  7 21:57:25 UTC 2026 */
