﻿body {
    font-family: 'Poppins', sans-serif;
}

.card {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
    margin-bottom: 20px;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }

.card-header {
    background: linear-gradient(45deg, #EDE8DC, #C1CFA1);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    padding: 15px;
}

.card-body {
    padding: 25px;
}

.form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    transition: all 0.3s ease;
    box-shadow: none;
    margin-bottom: 15px;
}

    .form-control:focus {
        border-color: #2196f3;
        box-shadow: 0 0 15px rgba(33, 150, 243, 0.2);
    }

.control-label {
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

/* Fix for button text visibility */
.btn {
    color: #fff !important; /* Force white text */
    font-weight: 500;
    border-radius: 8px;
    padding: 10px 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(45deg, #3f51b5, #2196f3);
    border: none;
}

/* Button with icon */
.btn-icon-left:before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
}

.btn-save:before {
    content: "\f0c7"; /* Save icon */
}

.btn-clear:before {
    content: "\f12d"; /* Eraser icon */
}

/* Button animation */
.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    z-index: -1;
}

.btn:hover:before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(1px);
}

/* Form field animation */
.input-animate {
    position: relative;
    margin-bottom: 20px;
}

    .input-animate .form-control:focus + .focus-border:before,
    .input-animate .form-control:focus + .focus-border:after {
        width: 50%;
    }

    .input-animate .focus-border:before,
    .input-animate .focus-border:after {
        content: "";
        position: absolute;
        bottom: 0;
        width: 0;
        height: 2px;
        background-color: #2196f3;
        transition: all 0.3s ease;
    }

    .input-animate .focus-border:before {
        left: 50%;
    }

    .input-animate .focus-border:after {
        right: 50%;
    }

/* Input group with icon */
.input-group-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #2196f3;
}

.input-with-icon {
    padding-left: 40px !important;
}

/* Breadcrumb styling */
.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: #2196f3;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .breadcrumb-item a:hover {
        color: #3f51b5;
    }

.breadcrumb-item + .breadcrumb-item::before {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    color: #888;
}

/* Error message styling */
.validator-error {
    color: #ff3300;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    20%, 60% {
        transform: translateX(-5px);
    }

    40%, 80% {
        transform: translateX(5px);
    }
}

/* Calendar styling */
.black .ajax__calendar_container {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Optional page transition */
.page-transition {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Label with icon */
.label-with-icon i {
    margin-right: 5px;
    color: #2196f3;
}

fieldset {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

    fieldset:hover {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

legend {
    font-weight: 600;
    font-size: 16px;
    color: #3f51b5;
    padding: 0 10px;
    background-color: white;
    border-radius: 4px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    width: auto;
    margin-bottom: 0;
}

/* Custom Checkbox Styling */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    margin-right: 8px;
    vertical-align: middle;
    background-color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

    input[type="checkbox"]:checked {
        background-color: #2196f3;
        border-color: #2196f3;
        box-shadow: 0 0 10px rgba(33, 150, 243, 0.3);
    }

    input[type="checkbox"]:focus {
        outline: none;
        border-color: #3f51b5;
        box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.2);
    }

    input[type="checkbox"]:hover {
        border-color: #2196f3;
        transform: scale(1.05);
    }

    input[type="checkbox"]:checked:hover {
        background-color: #1e88e5;
    }

    /* Checkmark effect */
    input[type="checkbox"]:checked:after {
        content: '\f00c';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        color: white;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0);
        font-size: 14px;
        animation: check-animation 0.3s forwards;
    }

/* Animation for checkmark */
@keyframes check-animation {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Label text styling */
input[type="checkbox"] + label,
input[type="checkbox"] + span {
    font-weight: 500;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #555;
}

input[type="checkbox"]:checked + label,
input[type="checkbox"]:checked + span {
    color: #2196f3;
}

/* Disabled state */
input[type="checkbox"]:disabled {
    background-color: #f0f0f0;
    border-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

    input[type="checkbox"]:disabled + label,
    input[type="checkbox"]:disabled + span {
        cursor: not-allowed;
        opacity: 0.6;
    }

/* Modern File Upload Styling */
.custom-file-upload {
    border: 2px dashed #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background-color: #f9f9f9;
    cursor: pointer;
}

    .custom-file-upload:hover {
        border-color: #2196f3;
        box-shadow: 0 5px 15px rgba(33, 150, 243, 0.2);
        transform: translateY(-3px);
    }

.file-upload-btn {
    display: inline-block;
    background: linear-gradient(45deg, #3f51b5, #2196f3);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

    .file-upload-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(33, 150, 243, 0.3);
    }

    .file-upload-btn:active {
        transform: translateY(1px);
    }

    .file-upload-btn i {
        margin-right: 8px;
        font-size: 18px;
        vertical-align: middle;
    }

    .file-upload-btn:before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: rgba(255, 255, 255, 0.2);
        transition: all 0.4s ease;
        z-index: 1;
    }

    .file-upload-btn:hover:before {
        left: 100%;
    }

.file-info {
    margin-top: 5px;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
}

.file-error {
    color: #f44336;
    font-weight: 500;
    animation: shake 0.5s ease-in-out;
}

.file-progress {
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    margin-top: 15px;
    overflow: hidden;
    display: none;
}

.file-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(45deg, #3f51b5, #2196f3);
    border-radius: 3px;
    transition: width 0.2s ease;
}

.file-uploaded {
    background: linear-gradient(45deg, #43a047, #4caf50);
}

    .file-uploaded:before {
        background: rgba(255, 255, 255, 0.3);
    }

/* Animation for successful upload */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.file-uploaded {
    animation: pulse 0.5s ease-in-out;
}

/* Make sure the file upload input is properly hidden but still accessible */
input[type="file"] {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.col-md-3 .date-picker-container {
    width: 100% !important;
}

/* Make the datepicker fill the bootstrap column */
.col-md-3 .date-picker-input.form-control {
    width: 100% !important;
    min-width: unset !important; /* Remove any min-width constraints */
    box-sizing: border-box;
}

/* Ensure your custom class doesn't limit width */
.custom-datepicker {
    width: 100% !important;
}

/* Fix for specific issue with date visibility */
.date-picker-input.form-control {
    padding-right: 60px !important; /* Ensure space for buttons */
}
