/* 
 * Global Button Styles
 * Modern, consistent, professional UI for Dr Khan Therapy
 */

/* Base Button Style */
.btn,
button,
input[type="submit"],
input[type="button"],
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* Spacing between icon and text */
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 6px;
    /* Rounded corners */
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Button Group / Row Alignment */
.btn-group,
.actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Table specific adjustments */
td .btn,
td .action-btn {
    padding: 6px 12px;
    font-size: 13px;
    margin: 0 2px;
}

/* Hover Effects - General */
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: white !important;
    /* Force white text */
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* --- Color Variants --- */

/* Primary - Blue */
.btn-primary {
    color: #fff !important;
    background-color: #3498db;
    border-color: #3498db;
}

.btn-primary:hover {
    color: #fff !important;
    background-color: #2980b9;
    border-color: #2980b9;
}

/* Success - Green */
.btn-success {
    color: #fff !important;
    background-color: #2ecc71;
    border-color: #2ecc71;
}

.btn-success:hover {
    color: #fff !important;
    background-color: #27ae60;
    border-color: #27ae60;
}

/* Danger - Red */
.btn-danger {
    color: #fff !important;
    background-color: #e74c3c;
    border-color: #e74c3c;
}

.btn-danger:hover {
    color: #fff !important;
    background-color: #c0392b;
    border-color: #c0392b;
}

/* Warning - Orange */
.btn-warning {
    color: #fff !important;
    /* White text for warning too */
    background-color: #f39c12;
    border-color: #f39c12;
}

.btn-warning:hover {
    color: #fff !important;
    background-color: #d35400;
    border-color: #d35400;
}

/* Info - Sky Blue */
.btn-info {
    color: #fff !important;
    background-color: #1abc9c;
    border-color: #1abc9c;
}

.btn-info:hover {
    color: #fff !important;
    background-color: #16a085;
    border-color: #16a085;
}

/* Dark - Grey/Black */
.btn-dark {
    color: #fff !important;
    background-color: #34495e;
    border-color: #34495e;
}

.btn-dark:hover {
    color: #fff !important;
    background-color: #2c3e50;
    border-color: #2c3e50;
}

/* Secondary / Default */
.btn-secondary,
.btn-default {
    color: #333 !important;
    background-color: #ecf0f1;
    border-color: #bdc3c7;
}

.btn-secondary:hover,
.btn-default:hover {
    color: #333 !important;
    background-color: #bdc3c7;
    border-color: #95a5a6;
}

/* Block Button (Full Width) */
.btn-block {
    display: flex;
    width: 100%;
}

/* Small Button Modifier */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 4px;
}

/* Large Button Modifier */
.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    line-height: 1.5;
    border-radius: 8px;
}

/* Icons in buttons */
.btn i,
.action-btn i {
    font-size: 1.1em;
}

/* Disabled State */
.btn:disabled,
.btn.disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {

    /* Stack buttons on mobile if inside a specific container, or generally */
    .btn-group-mobile-stack .btn {
        width: 100%;
        margin-bottom: 8px;
    }

    td .btn,
    td .action-btn {
        padding: 8px 12px;
        /* Touch friendly targets */
    }

    /* Ensure buttons in tables don't stack weirdly or take too much space */
    .table-actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .table-actions .btn {
        width: 100%;
        justify-content: center;
    }
}