/* 
 * Custom Button Styles for Medical Application
 * Site Colors: #DE6262 (Primary Red) & #2c3e50 (Dark Blue)
 * Consistent across all pages
 */

/* Primary Buttons - Main Actions */
.btn-custom-primary {
    background: linear-gradient(135deg, #2c3e50 0%, #DE6262 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-custom-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(222, 98, 98, 0.4);
    color: white;
    text-decoration: none;
}

.btn-custom-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(222, 98, 98, 0.25);
    color: white;
}

/* Secondary Buttons - Alternative Actions */
.btn-custom-secondary {
    background: white;
    border: 2px solid #DE6262;
    color: #DE6262;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-custom-secondary:hover {
    background: #DE6262;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(222, 98, 98, 0.3);
    text-decoration: none;
}

.btn-custom-secondary:focus {
    box-shadow: 0 0 0 0.2rem rgba(222, 98, 98, 0.25);
}

/* Success Buttons - Positive Actions */
.btn-custom-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-custom-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    color: white;
    text-decoration: none;
}

.btn-custom-success:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
    color: white;
}

/* Danger Buttons - Destructive Actions */
.btn-custom-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-custom-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    color: white;
    text-decoration: none;
}

.btn-custom-danger:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    color: white;
}

/* Info Buttons - Informational Actions */
.btn-custom-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-custom-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
    color: white;
    text-decoration: none;
}

.btn-custom-info:focus {
    box-shadow: 0 0 0 0.2rem rgba(23, 162, 184, 0.25);
    color: white;
}

/* Warning Buttons - Caution Actions */
.btn-custom-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    border: none;
    color: #212529;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn-custom-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
    color: #212529;
    text-decoration: none;
}

.btn-custom-warning:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25);
    color: #212529;
}

/* Small Button Variants for Tables and Compact Areas */
.btn-sm-custom-primary {
    background: linear-gradient(135deg, #2c3e50 0%, #DE6262 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-sm-custom-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(222, 98, 98, 0.4);
    color: white;
    text-decoration: none;
}

.btn-sm-custom-secondary {
    background: white;
    border: 2px solid #DE6262;
    color: #DE6262;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-sm-custom-secondary:hover {
    background: #DE6262;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(222, 98, 98, 0.3);
    text-decoration: none;
}

.btn-sm-custom-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-sm-custom-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    color: white;
    text-decoration: none;
}

.btn-sm-custom-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-sm-custom-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
    color: white;
    text-decoration: none;
}

.btn-sm-custom-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-sm-custom-info:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.4);
    color: white;
    text-decoration: none;
}

.btn-sm-custom-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    border: none;
    color: #212529;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
}

.btn-sm-custom-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    color: #212529;
    text-decoration: none;
}

/* Disabled State for All Custom Buttons */
.btn-custom-primary:disabled,
.btn-custom-secondary:disabled,
.btn-custom-success:disabled,
.btn-custom-danger:disabled,
.btn-custom-info:disabled,
.btn-custom-warning:disabled,
.btn-sm-custom-primary:disabled,
.btn-sm-custom-secondary:disabled,
.btn-sm-custom-success:disabled,
.btn-sm-custom-danger:disabled,
.btn-sm-custom-info:disabled,
.btn-sm-custom-warning:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Loading State */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .btn-custom-primary,
    .btn-custom-secondary,
    .btn-custom-success,
    .btn-custom-danger,
    .btn-custom-info,
    .btn-custom-warning {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .btn-sm-custom-primary,
    .btn-sm-custom-secondary,
    .btn-sm-custom-success,
    .btn-sm-custom-danger,
    .btn-sm-custom-info,
    .btn-sm-custom-warning {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Button Groups */
.btn-group-custom {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-group-custom .btn-custom-primary,
.btn-group-custom .btn-custom-secondary,
.btn-group-custom .btn-custom-success,
.btn-group-custom .btn-custom-danger,
.btn-group-custom .btn-custom-info,
.btn-group-custom .btn-custom-warning {
    margin: 0;
}

@media (max-width: 768px) {
    .btn-group-custom {
        flex-direction: column;
    }
    
    .btn-group-custom .btn-custom-primary,
    .btn-group-custom .btn-custom-secondary,
    .btn-group-custom .btn-custom-success,
    .btn-group-custom .btn-custom-danger,
    .btn-group-custom .btn-custom-info,
    .btn-group-custom .btn-custom-warning {
        width: 100%;
    }
}