/* Floating Button */
.mkb-floating-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    z-index: 9999;
    color: white;
}

.mkb-floating-button:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.mkb-floating-button:active {
    transform: scale(0.95) rotate(90deg);
}

/* Modal */
.mkb-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.mkb-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

.mkb-modal-content {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideIn 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.mkb-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    line-height: 1;
}

.mkb-modal-close:hover {
    color: #333;
}

.mkb-modal-content h2 {
    margin: 0 0 20px 0;
    font-size: 28px;
    color: #333;
    font-weight: 600;
}

/* Info Notice */
.mkb-info-notice {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-left: 4px solid #667eea;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mkb-info-notice svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: #667eea;
}

.mkb-info-notice p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

/* Form Styles */
.mkb-form-group {
    margin-bottom: 20px;
}

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

.mkb-form-group input[type="text"],
.mkb-form-group select,
.mkb-form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.mkb-form-group input[type="text"]:focus,
.mkb-form-group select:focus,
.mkb-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mkb-form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.mkb-field-hint {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 12px;
    line-height: 1.5;
    font-style: italic;
}

/* Form Actions */
.mkb-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 30px;
}

.mkb-btn {
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.mkb-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mkb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.mkb-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.mkb-btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.mkb-btn-secondary:hover {
    background: #e0e0e0;
}

/* Form Message */
.mkb-form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
    font-size: 14px;
    line-height: 1.6;
}

.mkb-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.mkb-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Loading State */
.mkb-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .mkb-floating-button {
        width: 56px;
        height: 56px;
        bottom: 20px;
        right: 20px;
    }

    .mkb-modal-content {
        padding: 25px 20px;
        width: 95%;
        max-height: 95vh;
        border-radius: 8px;
    }

    .mkb-modal-content h2 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .mkb-modal-close {
        font-size: 28px;
        top: 10px;
        right: 15px;
    }

    .mkb-info-notice {
        padding: 12px;
        font-size: 13px;
        margin-bottom: 20px;
    }

    .mkb-info-notice svg {
        width: 18px;
        height: 18px;
    }

    .mkb-form-group {
        margin-bottom: 18px;
    }

    .mkb-form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .mkb-form-group input[type="text"],
    .mkb-form-group select,
    .mkb-form-group textarea {
        padding: 10px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .mkb-form-group textarea {
        min-height: 120px;
    }

    .mkb-field-hint {
        font-size: 11px;
        margin-top: 6px;
    }

    .mkb-form-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 25px;
    }

    .mkb-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }

    .mkb-form-message {
        font-size: 13px;
        padding: 12px;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .mkb-floating-button {
        width: 52px;
        height: 52px;
        bottom: 15px;
        right: 15px;
    }

    .mkb-modal-content {
        padding: 20px 15px;
        width: 98%;
        max-height: 98vh;
    }

    .mkb-modal-content h2 {
        font-size: 20px;
    }

    .mkb-info-notice {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Landscape mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .mkb-modal-content {
        padding: 15px;
        max-height: 98vh;
    }

    .mkb-modal-content h2 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .mkb-info-notice {
        padding: 10px;
        margin-bottom: 15px;
    }

    .mkb-form-group {
        margin-bottom: 12px;
    }

    .mkb-form-group textarea {
        min-height: 80px;
    }

    .mkb-form-actions {
        margin-top: 15px;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .mkb-floating-button {
        -webkit-tap-highlight-color: transparent;
    }

    .mkb-btn {
        -webkit-tap-highlight-color: transparent;
    }

    /* Larger touch targets */
    .mkb-modal-close {
        padding: 10px;
    }
}

/* Scrollbar Styling for Modal */
.mkb-modal-content::-webkit-scrollbar {
    width: 8px;
}

.mkb-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.mkb-modal-content::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.mkb-modal-content::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}
