/* Reusable Components */

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #007bff;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(108, 117, 125, 0.3);
}

.btn-success {
    background-color: #28a745;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(40, 167, 69, 0.3);
}

.btn-outline-primary {
    background-color: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

.btn-outline-primary:hover {
    background-color: #007bff;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 123, 255, 0.3);
}

/* Cards */
.card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    font-weight: bold;
    color: #343a40;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box; /* Include padding in width */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 5px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.badge-primary {
    color: #fff;
    background-color: #007bff;
}

.badge-success {
    color: #fff;
    background-color: #28a745;
}

.badge-info {
    color: #fff;
    background-color: #17a2b8;
}

/* Dark Mode Adjustments for Components */
body.dark-mode .card {
    background-color: #2c3034;
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.05);
}

body.dark-mode .card-header {
    background-color: #343a40;
    border-bottom-color: #495057;
    color: #e9ecef;
}

body.dark-mode .card-body {
    color: #e9ecef;
}

body.dark-mode .card-footer {
    background-color: #343a40;
    border-top-color: #495057;
}

body.dark-mode .form-control {
    background-color: #495057;
    border-color: #6c757d;
    color: #e9ecef;
}

body.dark-mode .form-control:focus {
    border-color: #66b3ff;
    box-shadow: 0 0 0 0.2rem rgba(102, 179, 255, 0.25);
}

body.dark-mode .form-control::placeholder {
    color: #adb5bd;
}