/* Zalo Toolkit Button Styles */
.ztk-login-container, .zalo-login-container {
    width: 100%;
    margin: 5px 0 0 0;
    padding: 0;
    text-align: center;
    display: block;
}

.ztk-login-btn, .zalo-login-btn {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 400;
    padding: 11px 0;
    margin: 0 auto 10px auto;
    text-align: center;
    background: linear-gradient(135deg, #0180ff, #0068d9);
    color: #ffffff;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(1, 128, 255, 0.3);
}

.ztk-login-btn:hover, .zalo-login-btn:hover {
    background: linear-gradient(135deg, #0068d9, #0057c7);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(1, 128, 255, 0.4);
    text-decoration: none;
}

.ztk-login-btn:active, .zalo-login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(1, 128, 255, 0.3);
}

.ztk-login-btn .zalo-icon, .zalo-login-btn .zalo-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: 10px;
    vertical-align: middle;
    background-image: url('logo.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Loading state */
.ztk-login-btn.loading {
    background: linear-gradient(135deg, #666, #555);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ztk-login-btn.loading:hover {
    background: linear-gradient(135deg, #666, #555);
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.zalo-icon {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-image: url('logo.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

/* Login form integration */
#loginform .ztk-login-container {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #ddd;
}

/* Logged in state */
.ztk-login-logged-in {
    text-align: center;
    padding: 15px;
    background: #f0f8ff;
    border: 1px solid #0180ff;
    border-radius: 8px;
    margin: 10px 0;
}

.ztk-login-logged-in p {
    margin: 0;
    color: #0068d9;
}

.ztk-login-logged-in a {
    color: #0068d9;
    text-decoration: none;
    font-weight: 400;
}

.ztk-login-logged-in a:hover {
    text-decoration: underline;
}

/* Responsive design - Mobile First */
@media (max-width: 768px) {
    .ztk-login-btn, .zalo-login-btn {
        font-size: 15px;
        border-radius: 10px;
        padding: 10px 0;
    }
    
    .ztk-login-container, .zalo-login-container {
        margin: 10px 0;
        padding: 0 10px;
    }
    
    .ztk-login-btn .zalo-icon, .zalo-login-btn .zalo-icon {
        width: 20px;
        height: 20px;
        margin-right: 8px;
    }
    
    /* Mobile-specific button states */
    .ztk-login-btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .ztk-login-btn.loading {
        opacity: 0.7;
    }
}

@media (max-width: 480px) {
    .ztk-login-btn, .zalo-login-btn {
        padding: 15px 18px;
        font-size: 16px;
        border-radius: 25px;
    }
    
    .ztk-login-container, .zalo-login-container {
        margin: 20px 0;
    }
    
    .zalo-icon {
        width: 21px;
        height: 21px;
        margin-right: 12px;
    }
}

.zl-chat-left{
    right:auto!important;
    left:20px!important;
}

.zl-chat-custom{
    /* User can override via custom CSS */
}

/* Admin styles */
.zalo-login-settings .form-table th {
    width: 200px;
}

.zalo-login-settings .card {
    max-width: none;
}

.zalo-login-settings code {
    padding: 4px 8px;
    background: #f1f1f1;
    border-radius: 4px;
    font-size: 14px;
}

/* Error notification - Mobile responsive */
.ztk-error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    z-index: 9999;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

@media (max-width: 768px) {
    .ztk-error-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        border-radius: 10px;
        padding: 18px 20px;
    }
}

.ztk-error-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ztk-error-message {
    margin-right: 10px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .ztk-error-message {
        font-size: 16px;
        line-height: 1.4;
    }
}

.ztk-error-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ztk-error-close:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .ztk-error-close {
        font-size: 20px;
        width: 24px;
        height: 24px;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    @keyframes slideInRight {
        from {
            transform: translateY(-100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}