/* ==========================================
   COMPONENT STYLES: Buttons, Search, Dropdowns, Toast
   ========================================== */

/* Buttons */
.btn-add-data {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-add-data:hover {
    background: var(--dark-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.25);
}

.btn-reset {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-reset:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-edit {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.btn-edit:hover {
    background-color: #ffc107;
    color: white;
    transform: translateY(-2px);
}

.btn-delete {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.btn-delete:hover {
    background-color: #dc3545;
    color: white;
    transform: translateY(-2px);
}

/* Title Divider */
.title-divider {
    margin: 15px 0 25px 0;
    border: none;
    height: 3px;
    background: var(--border-color);
    border-radius: 10px;
    opacity: 0.6;
    transition: var(--transition);
}

/* Integrated Search */
.search-integrated {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    height: 42px;
    transition: var(--transition);
}

.search-integrated:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(5, 72, 42, 0.1);
}

.search-icon {
    color: var(--text-muted);
    font-size: 14px;
    padding: 0 12px;
}

.search-input-integrated {
    border: none;
    outline: none;
    padding: 10px 5px;
    font-size: 14px;
    flex: 1;
    min-width: 200px;
    background: transparent;
    color: var(--text-color);
}

.search-btn-integrated {
    background: var(--primary-color);
    border: none;
    color: white;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn-integrated:hover {
    background: var(--dark-color);
}

/* Dropdowns */
.custom-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    min-width: 130px;
}

.dropdown-btn:hover {
    border-color: var(--primary-color);
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    background: var(--card-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 100;
    min-width: 100%;
    overflow: hidden;
}

.dropdown-content.show {
    display: block;
}

.dropdown-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    cursor: pointer;
}

.dropdown-item:hover {
    background: var(--light-color);
}

.dropdown-item.active {
    background: var(--accent-color);
    color: var(--dark-color);
    font-weight: 600;
}

/* Toast Notifications */
@keyframes toast-in {
    from {
        transform: translateX(120px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120px);
        opacity: 0;
    }
}

.toast-notification {
    position: fixed;
    top: 100px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    pointer-events: auto;
    animation: toast-in 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-notification.hide {
    animation: toast-out 0.35s ease-in forwards;
}

.toast-body {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Progress bar countdown */
@keyframes progress-shrink {
    from { width: 100%; }
    to   { width: 0%; }
}

.toast-notification {
    flex-direction: column;
    padding: 15px 20px 0 20px;
    gap: 10px;
    overflow: hidden;
}

.toast-progress {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 0 0 12px 12px;
    margin: 0 -20px;
    width: calc(100% + 40px);
    animation: progress-shrink 3.2s linear forwards;
}

/* Responsive Component Styles */
@media (max-width: 992px) {
    .search-integrated {
        width: 100%;
    }

    .search-input-integrated {
        min-width: auto;
    }

    .custom-dropdown {
        width: 100%;
    }

    .dropdown-btn {
        width: 100%;
        justify-content: space-between;
    }

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