/* Button Styles - Unified across all pages */

/* Action Buttons - Clean Minimalist Design */
.action-btn {
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Primary - Soft dark blue matching header */
.action-btn.primary {
    background: #2e4f7a;
    color: #ffffff;
    border: 1px solid transparent;
}

.action-btn.primary:hover:not(:disabled) {
    background: #26456e;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 25, 38, 0.2);
}

/* Secondary - Light with border */
.action-btn.secondary {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.action-btn.secondary:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Danger - Soft warm red */
.action-btn.danger {
    background: #fecaca;
    color: #991b1b;
    flex-shrink: 0;
}

.action-btn.danger:hover:not(:disabled) {
    background: #fca5a5;
    color: #7f1d1d;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}

/* Success - Soft warm green */
.action-btn.success {
    background: #d1fae5;
    color: #065f46;
}

.action-btn.success:hover:not(:disabled) {
    background: #a7f3d0;
    color: #064e3b;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.2);
}

/* Warning - Soft warm orange */
.action-btn.warning {
    background: #fed7aa;
    color: #ea580c;
}

.action-btn.warning:hover:not(:disabled) {
    background: #fdba74;
    color: #c2410c;
    box-shadow: 0 2px 6px rgba(234, 88, 12, 0.2);
}

/* Info - Soft warm blue */
.action-btn.info {
    background: #dbeafe;
    color: #1e40af;
}

.action-btn.info:hover:not(:disabled) {
    background: #bfdbfe;
    color: #1e3a8a;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
}

/* Icon Buttons with Styled Background */
.icon-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.icon-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.icon-btn.primary {
    background: #dbeafe;
    color: #2563eb;
}

.icon-btn.primary:hover:not(:disabled) {
    background: #2563eb;
    color: white;
    transform: translateY(-1px);
}

.icon-btn.warning {
    background: #fef3c7;
    color: #d97706;
}

.icon-btn.warning:hover:not(:disabled) {
    background: #d97706;
    color: white;
    transform: translateY(-1px);
}

.icon-btn.danger {
    background: #fee2e2;
    color: #dc2626;
}

.icon-btn.danger:hover:not(:disabled) {
    background: #dc2626;
    color: white;
    transform: translateY(-1px);
}

.icon-btn.success {
    background: #d1fae5;
    color: #059669;
}

.icon-btn.success:hover:not(:disabled) {
    background: #059669;
    color: white;
    transform: translateY(-1px);
}

.icon-btn.secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.icon-btn.secondary:hover:not(:disabled) {
    background: #e5e7eb;
    color: #374151;
    transform: translateY(-1px);
}

/* Button Groups */
.btn-group {
    display: flex;
    gap: 12px;
}

.action-group {
    display: flex;
    gap: 8px;
}

/* Button States */
.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 25, 38, 0.1);
}

/* Block Button */
.btn-block {
    width: 100%;
    justify-content: center;
}


button .spinner-border {
    display: none;
}

button[disabled] .spinner-border {
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
    }

    .action-group {
        flex-direction: column;
    }

    .btn-block-mobile {
        width: 100%;
        justify-content: center;
    }
}

/* Badge Styles - Success/Danger badges for status */
.bg-success {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    width: 80px;
    height: 30px;
    border-radius: 5px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-danger {
    background-color: #fecaca !important;
    color: #991b1b !important;
    width: 80px;
    height: 30px;
    border-radius: 5px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Utility Classes */
.btn-link {
    color: #E88213 !important;
    text-decoration: underline !important;
    font-size: 14px !important;
}

.btn-link:hover {
    color: #c76e0f !important;
}

.text-light-muted {
    color: #b3b3b3 !important;
}

.icon-check {
    color: #065f46;
}

.icon-cross {
    color: #991b1b;
}

.text-check {
    color: #065f46;
}

.text-cross {
    color: #991b1b;
}

/* Meta Link Buttons */
.meta-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.meta-link:hover {
    background: #f39c12;
    border-color: #f39c12;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(243, 156, 18, 0.3);
}

.meta-link i {
    font-size: 14px;
}

/* Edit and Delete Metric Buttons */
.btn-edit-metric,
.btn-delete-metric {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-edit-metric {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #6b7280;
}

.btn-edit-metric:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.btn-delete-metric {
    background: transparent;
    border: 1px solid #e5e7eb;
    color: #ef4444;
}

.btn-delete-metric:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* Add to Dataset Button */
.add-to-dataset-btn {
    background: transparent;
    border: 1px solid #10b981;
    color: #10b981;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.add-to-dataset-btn:hover {
    background: #10b981;
    color: white;
}