/**
 * Bukiraj AI Chat - Styles
 * Suptilniji dizajn od dashboard-a
 */

#bukiraj-ai-chat-root {
    max-width: 900px;
    margin: 0 auto;
    padding: 32px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 500px;
    border-radius: 24px;
    border: 1px solid #efefef;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
}

/* Header */
.bai-chat-header {
    padding: 32px 0;
    margin-bottom: 32px;
    border-bottom: none;
}

.bai-chat-header-content {
    text-align: center;
}

.bai-chat-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.bai-chat-subtitle {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    font-weight: 400;
}

/* Messages Container */
.bai-chat-messages {
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    padding: 20px 0;
    margin-bottom: 24px;
}

.bai-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.bai-chat-messages::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 4px;
}

.bai-chat-messages::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.bai-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Message Bubbles */
.bai-message {
    display: flex;
    margin-bottom: 20px;
    animation: fadeInUp 0.3s ease;
}

.bai-message.user {
    justify-content: flex-end;
}

.bai-message.assistant {
    justify-content: flex-start;
}

.bai-message.system {
    justify-content: center;
}

/* Suggestions */
.bai-suggestions-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 20px 0;
    padding: 0 20px;
    animation: fadeInUp 0.4s ease;
}

.bai-suggestion-btn {
    background: #ffffff;
    border: 1px solid #efefef;
    border-radius: 16px;
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.bai-suggestion-btn:hover {
    background: #ffffff;
    border-color: #2563eb;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.bai-suggestion-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.bai-message-bubble {
    max-width: 75%;
    padding: 14px 20px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.5;
    word-wrap: break-word;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.bai-message.user .bai-message-bubble {
    background: #2563eb;
    color: #ffffff;
    border-radius: 20px 20px 4px 20px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    font-weight: 500;
    letter-spacing: -0.2px;
}

.bai-message.assistant .bai-message-bubble {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #efefef;
    border-radius: 20px 20px 20px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.bai-message.assistant .bai-message-bubble.bai-message-bubble-white {
    background: #ffffff;
    color: #1a1a1a;
    border: 1px solid #efefef;
    border-radius: 20px 20px 20px 4px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.bai-message.assistant .bai-message-bubble.has-card {
    background: transparent;
    padding: 0;
    max-width: 100%;
    width: 100%;
}

.bai-message.system .bai-message-bubble {
    background: transparent;
    color: #6b7280;
    font-size: 13px;
    padding: 8px 12px;
}

/* Typing Indicator */
.bai-typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
}

.bai-typing-dot {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

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

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

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Login Prompt */
.bai-login-prompt {
    text-align: center;
    padding: 16px 24px;
    margin-top: 16px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-radius: 0 0 24px 24px;
}

.bai-login-prompt p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    letter-spacing: 0.2px;
}

@media (max-width: 768px) {
    .bai-login-prompt {
        padding: 14px 20px;
        border-radius: 0 0 20px 20px;
    }
    
    .bai-login-prompt p {
        font-size: 13px;
    }
}

/* Input Container */
.bai-chat-input-container {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    padding: 20px 24px;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.02);
}

.bai-chat-input-wrapper {
    flex: 1;
    position: relative;
}

.bai-chat-input {
    width: 100%;
    padding: 14px 20px;
    border: 1.5px solid #e5e7eb;
    border-radius: 24px;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.2s ease;
    max-height: 120px;
    min-height: 44px;
    background: #ffffff;
}

.bai-chat-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.bai-chat-input::placeholder {
    color: #9ca3af;
}

.bai-chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #2563eb;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.bai-chat-send-btn:hover:not(:disabled) {
    background: #1d4ed8;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.bai-chat-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.bai-chat-send-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Status */
.bai-chat-status {
    text-align: center;
    padding: 8px;
    font-size: 13px;
    color: #8e8e93;
    letter-spacing: 0.2px;
}

.bai-chat-status.error {
    color: #dc2626;
    background: #fef2f2;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #fecaca;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
}

.bai-chat-status.success {
    color: #22c55e;
    background: #f0fdf4;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.1);
}

/* Appointment Card - New Premium Design */
.ai-appointment-card,
.ai-appointment-card * {
    box-sizing: border-box;
}

.ai-appointment-card {
    max-width: 70%;
    width: 70%;
    background: #ffffff;
    border: 1px solid #efefef;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
    color: #1a1a1a;
    margin: 20px 0;
}

.ai-card-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 22px;
    letter-spacing: -0.3px;
    color: #000;
}

.detail-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 26px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    font-size: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f8f8f8;
}

.detail-label {
    color: #8e8e93;
    font-weight: 400;
}

.detail-value {
    font-weight: 500;
    text-align: right;
    padding-left: 20px;
}

.detail-row:last-of-type {
    border-bottom: none;
}

.price-bold {
    font-weight: 700;
    color: #000;
    font-size: 15px;
}

.btn-container {
    width: 100%;
    display: flex;
    justify-content: center;
}

.btn-container-split {
    gap: 12px;
    flex-direction: row;
}

.btn-container-split .btn-edit,
.btn-container-split .btn-cancel-secondary {
    flex: 1;
}

.btn-cancel {
    display: block;
    width: 100%;
    background-color: #FF3B30;
    color: #ffffff !important;
    text-align: center;
    text-decoration: none !important;
    padding: 12px 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.btn-cancel:hover {
    background-color: #e03126;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.15);
}

.btn-edit {
    display: block;
    width: 100%;
    background-color: #2563eb;
    color: #ffffff !important;
    text-align: center;
    text-decoration: none !important;
    padding: 14px 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    border: none;
    cursor: pointer;
}

.btn-edit:hover {
    background-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.2);
}

.btn-edit:active {
    transform: translateY(0);
}

.btn-cancel-secondary {
    display: block;
    background-color: #ffffff;
    color: #FF3B30 !important;
    text-align: center;
    text-decoration: none !important;
    padding: 14px 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    border: 2px solid #FF3B30;
    cursor: pointer;
}

.btn-cancel-secondary:hover {
    background-color: #FFF5F5;
    border-color: #e03126;
    color: #e03126 !important;
}

.btn-cancel-secondary:active {
    transform: translateY(0);
}

.cancel-footer-note {
    margin-top: 18px;
    font-size: 12px;
    color: #999;
    line-height: 1.4;
    text-align: center;
}

.cancel-footer-note strong {
    color: #555;
}

/* Legacy Appointment Card (for reschedule and mixed cases) */
.bai-appointment-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
}

.bai-appointment-header {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.bai-appointment-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bai-appointment-field {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.bai-appointment-label {
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    flex-shrink: 0;
}

.bai-appointment-value {
    font-size: 14px;
    color: #111827;
    text-align: right;
    flex: 1;
}

.bai-appointment-actions {
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 8px;
    flex-direction: column;
}

.bai-appointment-cancel-btn,
.bai-appointment-reschedule-btn {
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
}

.bai-appointment-cancel-btn {
    background: #dc2626;
    color: #ffffff;
}

.bai-appointment-cancel-btn:hover:not(:disabled) {
    background: #b91c1c;
}

.bai-appointment-cancel-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.bai-appointment-reschedule-btn {
    background: #2563eb;
    color: #ffffff;
}

.bai-appointment-reschedule-btn:hover:not(:disabled) {
    background: #1d4ed8;
}

.bai-appointment-reschedule-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.bai-appointment-card.bai-appointment-canceled,
.ai-appointment-card.bai-appointment-canceled {
    opacity: 0.7;
    background: #fef2f2;
    border-color: #fecaca;
}

.bai-appointment-card.bai-appointment-canceled .bai-appointment-cancel-btn,
.ai-appointment-card.bai-appointment-canceled .btn-cancel {
    background: #9ca3af;
    cursor: not-allowed;
}

.bai-message-text {
    margin-bottom: 0;
}

.bai-message-time {
    font-size: 12px;
    color: #8e8e93;
    margin-top: 6px;
    margin-left: 8px;
    align-self: flex-end;
    letter-spacing: 0.2px;
}

.bai-message.user .bai-message-time {
    text-align: right;
}

.bai-message.assistant .bai-message-time {
    text-align: left;
}

.bai-message-text-only {
    position: relative;
}

.bai-message-text-only .bai-message-time {
    position: absolute;
    bottom: -18px;
    left: 12px;
    margin: 0;
}

.bai-typing-text {
    color: #6b7280;
    font-size: 14px;
    font-style: italic;
}

.bai-message-card-only {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.bai-message-text-only {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* AI Response Card - Premium Design */
.ai-response-card {
    max-width: 400px;
    background: #ffffff;
    border: 1px solid #f2f2f2;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
    margin: 10px auto;
    line-height: 1.6;
}

.ai-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #ff3b30;
    border-radius: 50%;
}

.ai-card-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8e8e93;
}

.ai-main-text {
    font-size: 16px;
    color: #1a1a1a;
    margin-bottom: 20px;
}

.ai-main-text strong {
    font-weight: 600;
    color: #000;
}

.appointment-info {
    background: #fcfcfc;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    border: 1px solid #f8f8f8;
}

.info-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.info-label {
    color: #8e8e93;
}

.info-value {
    font-weight: 500;
    color: #1a1a1a;
}

.staff-minimal {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.staff-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.staff-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.staff-meta {
    display: flex;
    flex-direction: column;
}

.staff-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.staff-phone {
    font-size: 13px;
    color: #8e8e93;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-call {
    background: #007AFF;
    color: white !important;
    text-decoration: none !important;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
    display: inline-block;
}

.btn-call:hover {
    background: #0063d1;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Staff Contact Message (Legacy - možda se još koristi) */
.bai-staff-contact-message {
    background: transparent;
    padding: 0;
    font-size: 14px;
    color: #1a1a1a;
}

.bai-staff-info {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.bai-staff-image {
    width: 64px;
    height: 64px;
    border-radius: 100px;
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.bai-staff-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bai-staff-name {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
    line-height: 1.4;
}

.bai-staff-phone {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

.bai-staff-contact-actions {
    margin-top: 12px;
}

.bai-message-content {
    margin-bottom: 16px;
    line-height: 1.6;
}

.bai-call-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #2563eb;
    border: 2px solid #2563eb;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-top: 12px;
}

.bai-call-button:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}


/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth transitions for all interactive elements */
.bai-message-bubble,
.bai-suggestion-btn,
.bai-chat-input,
.bai-chat-send-btn {
    transition: all 0.2s ease;
}

/* Responsive */
@media (max-width: 768px) {
    #bukiraj-ai-chat-root {
        padding: 20px;
        border-radius: 20px;
    }

    .bai-chat-messages {
        min-height: 300px;
        max-height: 500px;
        padding: 16px 0;
    }

    .bai-message-bubble {
        max-width: 85%;
        font-size: 14px;
        padding: 10px 14px;
    }
    
    .bai-message-bubble.has-card {
        padding: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .ai-appointment-card {
        max-width: 100%;
        width: 100%;
    }

    .bai-staff-image {
        width: 56px;
        height: 56px;
    }
    
    .bai-staff-name {
        font-size: 15px;
    }
    
    .bai-staff-phone {
        font-size: 13px;
    }
    
    .bai-call-button {
        padding: 8px 16px;
        font-size: 14px;
        width: 100%;
    }
    
    .bai-chat-input-container {
        padding: 16px;
        border-radius: 0 0 20px 20px;
    }

    .bai-chat-input-wrapper {
        padding: 0;
    }

    .bai-chat-send-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
    
    .bai-chat-input {
        min-height: 44px;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    #bukiraj-ai-chat-root {
        padding: 16px;
        border-radius: 20px;
    }

    .bai-chat-header {
        padding: 24px 0;
        margin-bottom: 24px;
    }

    .bai-chat-title {
        font-size: 22px;
    }

    .bai-chat-messages {
        min-height: 250px;
        max-height: 400px;
    }

    .bai-message-bubble {
        max-width: 90%;
        font-size: 14px;
    }
    
    .bai-message-bubble.has-card {
        padding: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .bai-suggestions-container {
        padding: 0 10px;
    }
    
    .bai-suggestion-btn {
        font-size: 14px;
        padding: 12px 16px;
    }

    .ai-appointment-card {
        max-width: 100%;
        width: 100%;
        margin: 10px 0;
        border-radius: 20px;
        padding: 20px;
    }
    
    .detail-row {
        font-size: 13px;
    }
    
    .bai-staff-image {
        width: 48px;
        height: 48px;
    }
    
    .bai-staff-name {
        font-size: 14px;
    }
    
    .bai-staff-phone {
        font-size: 12px;
    }
    
    .bai-call-button {
        padding: 8px 16px;
        font-size: 14px;
        width: 100%;
    }

    .bai-chat-input-wrapper {
        padding: 6px 10px;
    }

    .bai-chat-send-btn {
        width: 32px;
        height: 32px;
    }
    
    .bai-modal-content {
        width: 95%;
        padding: 24px;
        max-height: 85vh;
    }
    
    .bai-reschedule-title {
        font-size: 20px;
    }
    
    .ai-response-card {
        padding: 20px;
        max-width: 100%;
        margin: 10px 0;
    }
    
    .staff-minimal {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .staff-profile {
        width: 100%;
    }
    
    .btn-call {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 400px) {
    .ai-response-card {
        padding: 20px;
    }
    
    .staff-name {
        font-size: 13px;
    }
    
    .btn-call {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .ai-appointment-card {
        margin: 10px 0;
        border-radius: 20px;
        padding: 20px;
    }
}

/* Reschedule Modal */
.bai-modal {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10000 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.bai-modal.bai-modal-active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
}

.bai-modal-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(4px) !important;
}

.bai-modal-content {
    position: relative !important;
    background: #ffffff !important;
    border-radius: 24px !important;
    padding: 32px !important;
    max-width: 600px !important;
    width: 90% !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    z-index: 10001 !important;
    animation: modalSlideIn 0.3s ease !important;
}

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

.bai-modal-close {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    background: transparent !important;
    border: none !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    color: #6b7280 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    z-index: 10002 !important;
}

.bai-modal-close:hover {
    background: #f3f4f6 !important;
    color: #111827 !important;
}

#bai-modal-body,
#bai-cancel-modal-body {
    position: relative !important;
}

.bai-cancel-modal-content {
    max-width: 500px !important;
}

/* Cancel Modal Styles */
.bai-cancel-container {
    background: #ffffff !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-top: 0 !important;
}

.bai-cancel-title {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin-bottom: 12px !important;
    padding-right: 40px !important;
}

.bai-cancel-description {
    font-size: 16px !important;
    color: #374151 !important;
    margin-bottom: 24px !important;
    line-height: 1.5 !important;
}

.bai-cancel-details {
    background: #f9fafb !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 24px !important;
}

.bai-cancel-detail-row {
    display: flex !important;
    justify-content: space-between !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.bai-cancel-detail-row:last-child {
    border-bottom: none !important;
}

.bai-cancel-detail-label {
    color: #6b7280 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.bai-cancel-detail-value {
    color: #111827 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: right !important;
}

.bai-cancel-actions {
    display: flex !important;
    gap: 12px !important;
    flex-direction: column !important;
    margin-bottom: 24px !important;
}

.bai-cancel-footer-note {
    font-size: 12px !important;
    color: #999 !important;
    line-height: 1.4 !important;
    text-align: center !important;
}

.bai-cancel-footer-note strong {
    color: #555 !important;
}

.bai-btn-cancel-modal {
    background-color: #FF3B30 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 24px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
}

.bai-btn-cancel-modal:hover:not(:disabled) {
    background-color: #e03126 !important;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.15) !important;
}

.bai-btn-cancel-modal:disabled {
    background-color: #9ca3af !important;
    cursor: not-allowed !important;
}

/* Reschedule Calendar Styles */
.bai-reschedule-container {
    background: #ffffff !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-top: 0 !important;
}

.bai-reschedule-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #111827 !important;
    margin-bottom: 8px !important;
}

.bai-reschedule-description {
    font-size: 14px !important;
    color: #6b7280 !important;
    margin-bottom: 20px !important;
}

/* Calendar Styles */
.bai-calendar-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin-bottom: 20px;
}

.bai-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.bai-calendar-nav-btn {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
}

.bai-calendar-nav-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.bai-calendar-month-year {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.bai-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.bai-calendar-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    padding: 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bai-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.bai-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
    background: white;
    border: 1px solid transparent;
}

.bai-calendar-day:hover:not(.disabled):not(.selected) {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.bai-calendar-day.disabled {
    color: #d1d5db;
    cursor: not-allowed;
    background: #f9fafb;
}

.bai-calendar-day.today {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

.bai-calendar-day.selected {
    background: #111827;
    color: white;
    font-weight: 600;
    border-color: #111827;
}

/* Time Slots Styles */
.bai-time-slots-container {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin-bottom: 20px;
}

.bai-time-slots-title {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.bai-time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
}

.bai-time-slot {
    padding: 10px 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.bai-time-slot:hover:not(.disabled):not(.selected) {
    border-color: #111827;
    background: #f9fafb;
}

.bai-time-slot.selected {
    background: #111827;
    color: white;
    border-color: #111827;
}

.bai-time-slot.disabled {
    color: #d1d5db;
    cursor: not-allowed;
    background: #f9fafb;
    border-color: #e5e7eb;
}

.bai-time-slots-loading {
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    padding: 30px 20px;
}

/* Reschedule Actions */
.bai-reschedule-actions {
    display: flex !important;
    gap: 10px !important;
    margin-top: 16px !important;
}

.bai-btn {
    flex: 1 !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: background-color 0.2s ease !important;
}

.bai-btn:disabled {
    background: #9ca3af !important;
    cursor: not-allowed !important;
}

.bai-btn-success {
    background: #22c55e !important;
    color: #ffffff !important;
}

.bai-btn-success:hover:not(:disabled) {
    background: #16a34a !important;
}

.bai-btn-secondary {
    background: #6b7280 !important;
    color: #ffffff !important;
}

.bai-btn-secondary:hover:not(:disabled) {
    background: #4b5563 !important;
}

@media (max-width: 640px) {
    .bai-calendar-container {
        padding: 16px;
    }
    
    .bai-time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
    }
    
    .bai-time-slot {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .bai-reschedule-actions {
        flex-direction: column;
    }
}

/* Appointment Grid Layout */
.bai-grid-container {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    justify-content: flex-start !important;
    padding: 10px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif !important;
}

.appointment-card {
    background: #ffffff !important;
    border: 1px solid #efefef !important;
    border-radius: 20px !important;
    padding: 24px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04) !important;
    flex: 1 1 320px !important;
    max-width: 400px !important;
    display: flex !important;
    flex-direction: column !important;
    transition: transform 0.2s ease !important;
    box-sizing: border-box !important;
}

.appointment-card:hover {
    transform: translateY(-2px) !important;
}

.card-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    margin-bottom: 20px !important;
}

.service-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #000 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
}

.status-pill {
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 4px 10px !important;
    border-radius: 50px !important;
    background: #e8fbf0 !important;
    color: #10b981 !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
}

.status-pill.status-pending {
    background: #fef3c7 !important;
    color: #f59e0b !important;
}

.status-pill.status-canceled {
    background: #fee2e2 !important;
    color: #ef4444 !important;
}

.card-body {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
}

.data-row {
    display: flex !important;
    justify-content: space-between !important;
    font-size: 14px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #f8f8f8 !important;
}

.data-label {
    color: #8e8e93 !important;
}

.data-value {
    font-weight: 500 !important;
    text-align: right !important;
    color: #1a1a1a !important;
}

.data-value.price-bold {
    font-weight: 700 !important;
}

.card-permissions {
    display: flex !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
}

.perm-badge {
    font-size: 11px !important;
    color: #666 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.perm-badge .dot {
    width: 6px !important;
    height: 6px !important;
    border-radius: 50% !important;
    background-color: #34C759 !important;
}

.perm-badge.disabled .dot {
    background-color: #d1d5db !important;
}

.btn-manage-card {
    background: #007AFF !important;
    color: white !important;
    text-align: center !important;
    padding: 12px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: 0.2s !important;
    cursor: pointer !important;
    border: none !important;
    display: block !important;
}

.btn-manage-card:hover {
    background: #0063d1 !important;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.2) !important;
}

@media (max-width: 480px) {
    .appointment-card {
        flex: 1 1 100% !important;
        padding: 20px !important;
    }
}
