/* ============================================
   BIDFARM - Sistema de UX para Ofertas
   Arquivo CSS reutilizável para páginas de oferta
   ============================================ */

/* ========== PROGRESS STEPS ========== */
.progress-step {
    position: relative;
}

.progress-step.active .step-circle {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-weight: bold;
    border: none;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.progress-step.active .step-line {
    border-color: #28a745 !important;
    border-width: 3px !important;
}

.step-circle {
    width: 60px;
    height: 60px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.step-line {
    height: 3px;
    background: #dee2e6;
    transition: all 0.3s ease;
}

/* ========== CARDS E CONTAINERS ========== */
.info-card {
    border: none;
    transition: all 0.3s ease;
}

.info-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.section-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.section-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #dee2e6;
}

.section-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
    border-radius: 12px 12px 0 0;
    padding: 16px 20px;
}

.section-header h5 {
    margin: 0;
    color: #495057;
    font-weight: 600;
}

.section-header i {
    font-size: 1.3rem;
    color: #0d6efd;
}

/* ========== PRODUCT CARDS ========== */
.product-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.product-card .card-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    padding: 12px 16px;
    border: none;
}

.product-card .badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    font-weight: 500;
}

.product-card .info-item {
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
}

.product-card .info-item:last-child {
    border-bottom: none;
}

.product-card .info-item i {
    color: #6c757d;
    width: 20px;
}

/* ========== BUTTONS ========== */
.action-button {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    font-weight: 500;
    border-radius: 8px;
    padding: 12px 20px;
}

.action-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.action-button:active:not(:disabled) {
    transform: translateY(0);
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-button i {
    font-size: 1.1rem;
}

.btn-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
    color: white;
}

.btn-gradient-primary:hover {
    background: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
    color: white;
}

.btn-gradient-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    color: white;
}

.btn-gradient-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    color: white;
}

/* ========== FORMS ========== */
.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-label i {
    color: #0d6efd;
    margin-right: 4px;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.data-badge {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    border-left: 3px solid #0d6efd;
}

/* ========== FILTERS ========== */
.filter-offcanvas .offcanvas-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
}

.filter-offcanvas .form-label {
    font-size: 0.9rem;
    font-weight: 600;
}

.filter-offcanvas .form-text {
    font-size: 0.75rem;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    padding: 60px 20px;
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 20px;
}

.empty-state h5 {
    color: #6c757d;
    font-weight: 500;
}

.empty-state p {
    color: #adb5bd;
}

/* ========== CHAT BOX ========== */
.chat-box {
    width: 380px;
    position: fixed;
    bottom: 80px;
    right: 20px;
    display: none;
    z-index: 9998;
    border-radius: 20px;
}

.chat-box .card-header {
    border: 0;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

.chat-box .avatar-circle {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-weight: bold;
}

.chat-box .card-body {
    height: 350px;
    overflow-y: auto;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    padding: 16px;
}

.chat-box .message-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    animation: slideIn 0.3s ease;
    word-wrap: break-word;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-box .message-bubble.sent {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-box .message-bubble.received {
    background-color: white;
    border: 1px solid #e9ecef;
    color: #212529;
    border-bottom-left-radius: 4px;
}

.chat-box .card-footer {
    border: 0;
    padding: 12px;
    background-color: #f8f9fa;
    border-radius: 0 0 20px 20px;
}

.chat-box textarea {
    border-radius: 15px;
    background-color: white;
    font-size: 0.9rem;
    resize: none;
    border: 1px solid #dee2e6;
}

.chat-box textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.chat-box .btn-send {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
}

/* ========== MODALS ========== */
.modal-header-gradient {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    border: none;
}

.modal-header-gradient .btn-close {
    filter: brightness(0) invert(1);
}

.modal-content {
    border-radius: 12px;
    overflow: hidden;
}

/* ========== ANIMATIONS ========== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* ========== BADGES ========== */
.badge-status {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.8rem;
}

.badge-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.badge-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.badge-danger {
    background-color: #f8d7da;
    color: #842029;
}

.badge-info {
    background-color: #cff4fc;
    color: #055160;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .step-circle {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
    }
    
    .action-button span {
        font-size: 0.85rem;
    }
    
    .action-button i {
        font-size: 1rem;
    }
    
    .section-header {
        padding: 12px 16px;
    }
    
    .section-header h5 {
        font-size: 1rem;
    }
    
    .chat-box {
        width: 100%;
        right: 0;
        left: 0;
        bottom: 0;
        border-radius: 20px 20px 0 0;
    }
    
    .product-card {
        margin-bottom: 16px;
    }
}

@media (max-width: 576px) {
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }
    
    .action-button {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* ========== LISTING PAGES (Páginas de Listagem) ========== */
.filter-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.filter-section .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
}

.search-button {
    transition: all 0.2s ease;
    font-weight: 500;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.new-button {
    transition: all 0.2s ease;
    font-weight: 500;
}

.new-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table-container table {
    margin-bottom: 0;
}

.table-container thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.table-container thead th {
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding: 16px;
}

.table-container tbody tr {
    transition: background-color 0.2s ease;
}

.table-container tbody tr:hover {
    background-color: #f8f9fa;
}

.table-container tbody td {
    padding: 14px 16px;
    vertical-align: middle;
}

.table-action-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.table-action-btn:hover {
    transform: translateY(-1px);
}

/* ========== REGISTRATION PAGES (Páginas de Cadastro) ========== */
.registration-header {
    text-align: center;
    margin-bottom: 32px;
}

.registration-header h2 {
    font-weight: bold;
    color: #198754;
    margin-bottom: 16px;
}

.registration-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.registration-card .card-body {
    padding: 32px;
}

.registration-alert {
    border-radius: 8px;
    font-size: 1rem;
}

.terms-link {
    color: #0d6efd;
    text-decoration: none;
    font-weight: 500;
}

.terms-link:hover {
    text-decoration: underline;
}

/* ========== PAGINATION ========== */
.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

.items-per-page-selector {
    max-width: 100px;
}

/* ========== UTILITIES ========== */
.text-gradient-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.shadow-hover {
    transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.border-gradient {
    border-image: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) 1;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 8px;
}

.page-subtitle {
    color: #6c757d;
    font-size: 1rem;
}
