/* ===== MediForms Button System ===== */
/* Centralized button styles for consistent UI/UX across the application */

/* Base Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    line-height: 1.5;
}

.btn svg {
    flex-shrink: 0;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
    gap: 6px;
}

.btn-md {
    padding: 10px 18px;
    font-size: 15px;
    gap: 8px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    gap: 10px;
}

/* Primary Button - Main Actions (Blue) */
.btn-primary {
    background: #0097E2;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 151, 226, 0.2);
}

.btn-primary:hover:not(:disabled) {
    background: #0084c7;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 151, 226, 0.3);
}

.btn-primary:active:not(:disabled) {
    background: #006fa3;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 151, 226, 0.2);
}

/* Secondary Button - Alternative Actions (Gray) */
.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 2px 2px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 4px rgba(108, 117, 125, 0.4);
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(0);
}

/* Success Button - Positive Actions (Green) */
.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    box-shadow: 0 2px 2px rgba(40, 167, 69, 0.3);
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 4px rgba(40, 167, 69, 0.4);
}

.btn-success:active:not(:disabled) {
    transform: translateY(0);
}

/* Danger Button - Destructive Actions (Red) */
.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 2px 2px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 3px 4px rgba(220, 53, 69, 0.4);
}

.btn-danger:active:not(:disabled) {
    transform: translateY(0);
}

/* Warning Button - Caution Actions (Clean Orange) */
.btn-warning {
    background: #ff9800;
    color: white;
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.2);
}

.btn-warning:hover:not(:disabled) {
    background: #fb8c00;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

.btn-warning:active:not(:disabled) {
    background: #f57c00;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.2);
}

/* Outline Button Variants - Transparent with Border */
.btn-outline {
    background-color: transparent;
    border: 1px solid;
    box-shadow: none;
}

.btn-outline.btn-primary {
    background: transparent;
    color: #0097E2;
    border-color: #0097E2;
}

.btn-outline.btn-primary:hover:not(:disabled) {
    background-color: #0097E2;
    color: white;
    transform: translateY(-1px);
}

.btn-outline.btn-secondary {
    background: transparent;
    color: #6c757d;
    border-color: #6c757d;
}

.btn-outline.btn-secondary:hover:not(:disabled) {
    background-color: #6c757d;
    color: white;
    transform: translateY(-1px);
}

.btn-outline.btn-success {
    background: transparent;
    color: #28a745;
    border-color: #28a745;
}

.btn-outline.btn-success:hover:not(:disabled) {
    background-color: #28a745;
    color: white;
    transform: translateY(-1px);
}

.btn-outline.btn-danger {
    background: transparent;
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline.btn-danger:hover:not(:disabled) {
    background-color: #dc3545;
    color: white;
    transform: translateY(-1px);
}

/* Icon-Only Button */
.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
    gap: 0;
}

.btn-icon.btn-sm {
    padding: 6px;
    width: 28px;
    height: 28px;
}

.btn-icon.btn-lg {
    padding: 10px;
    width: 44px;
    height: 44px;
}

/* ===== Small Icon Buttons (32px) ===== */
/* Perfect for table actions, edit/delete buttons */

.btn-icon-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    margin: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    border: 1px solid #dee2e6;
}

/* Edit Button - Gray with grayscale emoji */
.btn-icon-edit {
    background: #e9ecef;
    color: #495057;
    filter: grayscale(0.8);
}

.btn-icon-edit:hover {
    background: #0097E2;
    border-color: #0097E2;
    color: white;
    filter: grayscale(0);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 151, 226, 0.2);
}

/* Delete Button - Gray with red hover */
.btn-icon-delete {
    background: #f4f4f4;
    border: 1px solid #ccc;
    color: #d32f2f;
    filter: grayscale(0.8);
}

.btn-icon-delete:hover {
    background: #ffe5e5;
    border-color: #ffcdd2;
    filter: grayscale(0);
    transform: scale(1.05);
}

.btn-icon-delete:disabled {
    background: #f4f4f4;
    border: 1px solid #ddd;
    color: #aaa;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
    filter: grayscale(1);
}

/* Move Buttons - Up/Down arrows */
.btn-icon-move {
    background: #f4f4f4;
    border: 1px solid #ccc;
    color: #333;
}

.btn-icon-move:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}

.btn-icon-move:disabled {
    background: #f4f4f4;
    border: 1px solid #ddd;
    color: #aaa;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

/* ===== Back Button ===== */
.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f44336;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-back:hover {
    background: #d32f2f;
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.3);
}

/* Full Width Button */
.btn-block {
    width: 100%;
    display: flex;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .btn {
        padding: 12px 16px;
    }

    .btn-sm {
        padding: 8px 12px;
        font-size: 13px;
    }

    .btn-lg {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .btn {
        font-size: 14px;
        padding: 10px 12px;
    }

    .btn svg {
        width: 16px;
        height: 16px;
    }
}
