/*
 * SAMA Engenharia - Material Design 2 Customizations
 * Customizações específicas do Material Design 2
 */

/* ========================================
   MATERIAL DESIGN COMPONENTS
   ======================================== */

/* Cards Material */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 4px -1px rgba(0,0,0,0.2), 
                0 4px 5px 0 rgba(0,0,0,0.14), 
                0 1px 10px 0 rgba(0,0,0,0.12);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 5px -3px rgba(0,0,0,0.2), 
                0 8px 10px 1px rgba(0,0,0,0.14), 
                0 3px 14px 2px rgba(0,0,0,0.12);
}

/* Form Controls Material */
.form-control {
    border: 1px solid #DEE2E6;
    border-radius: 4px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: #005A65;
    box-shadow: 0 0 0 3px rgba(0, 90, 101, 0.15);
}

.form-floating > .form-control {
    padding: 16px;
    height: calc(3.5rem + 2px);
}

.form-floating > label {
    padding: 16px;
    color: #6A6A69;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #005A65;
    font-weight: 500;
}

.form-select {
    border: 1px solid #DEE2E6;
    border-radius: 4px;
    padding: 12px 36px 12px 16px;
}

.form-select:focus {
    border-color: #005A65;
    box-shadow: 0 0 0 3px rgba(0, 90, 101, 0.15);
}

/* Badges Material */
.badge {
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* Buttons Material */
.btn {
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 10px 24px;
    position: relative;
    overflow: hidden;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 0.95rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

/* Elevation Classes */
.elevation-1 {
    box-shadow: 0 2px 1px -1px rgba(0,0,0,0.2), 
                0 1px 1px 0 rgba(0,0,0,0.14), 
                0 1px 3px 0 rgba(0,0,0,0.12);
}

.elevation-2 {
    box-shadow: 0 3px 1px -2px rgba(0,0,0,0.2), 
                0 2px 2px 0 rgba(0,0,0,0.14), 
                0 1px 5px 0 rgba(0,0,0,0.12);
}

.elevation-4 {
    box-shadow: 0 2px 4px -1px rgba(0,0,0,0.2), 
                0 4px 5px 0 rgba(0,0,0,0.14), 
                0 1px 10px 0 rgba(0,0,0,0.12);
}

.elevation-8 {
    box-shadow: 0 5px 5px -3px rgba(0,0,0,0.2), 
                0 8px 10px 1px rgba(0,0,0,0.14), 
                0 3px 14px 2px rgba(0,0,0,0.12);
}

/* Material Icons sizing */
.material-icons {
    vertical-align: middle;
    line-height: 1;
}

.material-icons.md-18 { font-size: 18px; }
.material-icons.md-24 { font-size: 24px; }
.material-icons.md-36 { font-size: 36px; }
.material-icons.md-48 { font-size: 48px; }

/* Chips Material */
.chip {
    display: inline-flex;
    align-items: center;
    background: #F8F9FA;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 0.875rem;
    color: #4A4A49;
    margin: 4px;
}

.chip-icon {
    margin-right: 8px;
    color: #005A65;
}

/* Lists Material */
.list-group-item {
    border: none;
    border-bottom: 1px solid #E9ECEF;
    padding: 16px;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item.active {
    background-color: #005A65;
    border-color: #005A65;
}

/* Progress Material */
.progress {
    height: 4px;
    border-radius: 2px;
    background-color: #E9ECEF;
}

.progress-bar {
    background-color: #005A65;
    border-radius: 2px;
}

/* Alerts Material */
.alert {
    border: none;
    border-radius: 4px;
    padding: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.alert-primary {
    background-color: rgba(0, 90, 101, 0.1);
    color: #005A65;
}

/* Tooltips Material */
.tooltip {
    font-size: 0.75rem;
}

.tooltip-inner {
    background-color: #2D2D2D;
    padding: 8px 12px;
    border-radius: 4px;
}

/* Modals Material */
.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14), 
                0 9px 46px 8px rgba(0,0,0,0.12), 
                0 11px 15px -7px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #E9ECEF;
    padding: 20px 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid #E9ECEF;
    padding: 16px 24px;
}

/* Tabs Material */
.nav-tabs {
    border-bottom: 1px solid #E9ECEF;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: #6A6A69;
    font-weight: 500;
    padding: 12px 24px;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: #005A65;
}

.nav-tabs .nav-link.active {
    border-bottom-color: #005A65;
    color: #005A65;
    background: transparent;
}

/* Breadcrumbs Material */
.breadcrumb {
    background: transparent;
    padding: 8px 0;
}

.breadcrumb-item a {
    color: #6A6A69;
}

.breadcrumb-item a:hover {
    color: #005A65;
}

.breadcrumb-item.active {
    color: #4A4A49;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: 'chevron_right';
    font-family: 'Material Icons';
    font-size: 18px;
    vertical-align: middle;
    color: #6A6A69;
}

/* Pagination Material */
.pagination {
    border-radius: 4px;
}

.page-link {
    border: none;
    color: #4A4A49;
    font-weight: 500;
    padding: 10px 16px;
}

.page-link:hover {
    background-color: #F8F9FA;
    color: #005A65;
}

.page-item.active .page-link {
    background-color: #005A65;
    color: #FFFFFF;
}

.page-item.disabled .page-link {
    color: #6A6A69;
}

/* Dropdowns Material */
.dropdown-menu {
    border: none;
    border-radius: 4px;
    box-shadow: 0 5px 5px -3px rgba(0,0,0,0.2), 
                0 8px 10px 1px rgba(0,0,0,0.14), 
                0 3px 14px 2px rgba(0,0,0,0.12);
    padding: 8px 0;
}

.dropdown-item {
    padding: 12px 24px;
    color: #4A4A49;
    font-weight: 400;
}

.dropdown-item:hover {
    background-color: #F8F9FA;
    color: #005A65;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: #005A65;
    color: #FFFFFF;
}

.dropdown-divider {
    margin: 8px 0;
    border-color: #E9ECEF;
}

/* Accordion Material */
.accordion-item {
    border: none;
    border-bottom: 1px solid #E9ECEF;
}

.accordion-button {
    padding: 20px 0;
    font-weight: 500;
    color: #4A4A49;
    background: transparent;
    box-shadow: none;
}

.accordion-button:not(.collapsed) {
    color: #005A65;
    background: transparent;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

.accordion-body {
    padding: 0 0 20px;
    color: #6A6A69;
}

/* Toast Material */
.toast {
    border: none;
    border-radius: 4px;
    box-shadow: 0 5px 5px -3px rgba(0,0,0,0.2), 
                0 8px 10px 1px rgba(0,0,0,0.14), 
                0 3px 14px 2px rgba(0,0,0,0.12);
}

.toast-header {
    border-bottom: none;
    padding: 12px 16px;
}

.toast-body {
    padding: 16px;
}

/* Spinner Material */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.2rem;
}

.spinner-border.text-primary {
    color: #005A65 !important;
}

/* Tables Material */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    border-bottom: 2px solid #E9ECEF;
    border-top: none;
    color: #6A6A69;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 16px;
}

.table tbody td {
    border-bottom: 1px solid #E9ECEF;
    padding: 16px;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #F8F9FA;
}

/* Floating Action Button (FAB) */
.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #005A65;
    color: #FFFFFF;
    border: none;
    box-shadow: 0 3px 5px -1px rgba(0,0,0,0.2), 
                0 6px 10px 0 rgba(0,0,0,0.14), 
                0 1px 18px 0 rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

.fab:hover {
    box-shadow: 0 5px 5px -3px rgba(0,0,0,0.2), 
                0 8px 10px 1px rgba(0,0,0,0.14), 
                0 3px 14px 2px rgba(0,0,0,0.12);
    transform: scale(1.1);
}

.fab .material-icons {
    font-size: 24px;
}

/* Speed Dial */
.speed-dial {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
}

.speed-dial-items {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    margin-bottom: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.speed-dial.active .speed-dial-items {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.speed-dial-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #FFFFFF;
    color: #4A4A49;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.speed-dial-item:hover {
    background-color: #005A65;
    color: #FFFFFF;
}

/* Snackbar */
.snackbar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #2D2D2D;
    color: #FFFFFF;
    padding: 14px 24px;
    border-radius: 4px;
    box-shadow: 0 3px 5px -1px rgba(0,0,0,0.2), 
                0 6px 10px 0 rgba(0,0,0,0.14), 
                0 1px 18px 0 rgba(0,0,0,0.12);
    display: flex;
    align-items: center;
    gap: 24px;
    z-index: 1100;
    opacity: 0;
    transition: all 0.3s ease;
}

.snackbar.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.snackbar-action {
    color: #005A65;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.875rem;
    cursor: pointer;
}

/* Divider Material */
.divider {
    height: 1px;
    background-color: #E9ECEF;
    margin: 16px 0;
}

.divider-vertical {
    width: 1px;
    height: 100%;
    background-color: #E9ECEF;
    margin: 0 16px;
}

/* Avatar Material */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #005A65;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 1rem;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: 1.5rem;
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        #F8F9FA 25%,
        #E9ECEF 50%,
        #F8F9FA 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive adjustments for Material components */
@media (max-width: 767.98px) {
    .fab {
        width: 48px;
        height: 48px;
        bottom: 16px;
        right: 16px;
    }
    
    .fab .material-icons {
        font-size: 20px;
    }
    
    .snackbar {
        left: 16px;
        right: 16px;
        transform: translateY(100px);
    }
    
    .snackbar.show {
        transform: translateY(0);
    }
    
    .modal-dialog {
        margin: 16px;
    }
}
