/* ========================================
   TRANSACTION HISTORY FEATURE CSS
   Add this to your existing product.css
   ======================================== */

/* Floating Button Styles */
.floating-history-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #e60012, #cc0010);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 15px 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(230, 0, 18, 0.4);
    z-index: 1500;
    display: none;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.floating-history-btn.show {
    display: flex;
}

.floating-history-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(230, 0, 18, 0.5);
    background: linear-gradient(135deg, #ff0015, #e60012);
}

.floating-history-btn i {
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* History Modal Styles */
.history-modal {
    display: none;
    position: fixed;
    z-index: 2500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.history-modal.active {
    display: flex;
}

.history-modal-content {
    background: white;
    border-radius: 20px;
    width: 95%;
    max-width: 1200px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
    animation: modalSlideUp 0.4s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.history-modal-header {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #e60012;
}

.history-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.history-modal-header h2 i {
    color: #e60012;
}

.history-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.history-close-btn:hover {
    background: #e60012;
    transform: rotate(90deg);
}

.history-modal-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0;
    overflow: hidden;
    flex: 1;
}

/* Transaction Panel */
.transactions-panel {
    padding: 2rem;
    overflow-y: auto;
    border-right: 2px solid #f0f0f0;
    background: #fafafa;
}

.panel-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title i {
    color: #e60012;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.transaction-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #e60012;
}

.transaction-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    transform: translateX(5px);
}

.transaction-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.transaction-service {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.transaction-status {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #d4edda;
    color: #155724;
}

.status-completed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.transaction-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    color: #666;
    font-size: 0.9rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-item i {
    color: #e60012;
    width: 16px;
}

.transaction-price {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 1.2rem;
    font-weight: 700;
    color: #e60012;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Notifications Panel */
.notifications-panel {
    padding: 2rem;
    overflow-y: auto;
    background: white;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.2rem;
    border-left: 4px solid #17a2b8;
    transition: all 0.3s ease;
}

.notification-item:hover {
    background: #e9ecef;
    transform: translateX(-5px);
}

.notification-item.unread {
    background: #e3f2fd;
    border-left-color: #2196f3;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.notification-title {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.notification-time {
    font-size: 0.75rem;
    color: #999;
}

.notification-message {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.notification-badge {
    background: #e60012;
    color: white;
    border-radius: 50%;
    width: 8px;
    height: 8px;
    display: inline-block;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9rem;
}

/* Scrollbar Styles */
.transactions-panel::-webkit-scrollbar,
.notifications-panel::-webkit-scrollbar {
    width: 6px;
}

.transactions-panel::-webkit-scrollbar-track,
.notifications-panel::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.transactions-panel::-webkit-scrollbar-thumb,
.notifications-panel::-webkit-scrollbar-thumb {
    background: #e60012;
    border-radius: 3px;
}

.transactions-panel::-webkit-scrollbar-thumb:hover,
.notifications-panel::-webkit-scrollbar-thumb:hover {
    background: #cc0010;
}

/* Responsive Design */
@media (max-width: 968px) {
    .history-modal-body {
        grid-template-columns: 1fr;
    }

    .transactions-panel {
        border-right: none;
        border-bottom: 2px solid #f0f0f0;
        max-height: 50vh;
    }

    .notifications-panel {
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    .floating-history-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .floating-history-btn span {
        display: none;
    }

    .floating-history-btn i {
        font-size: 1.5rem;
    }

    .history-modal-content {
        width: 98%;
        max-height: 90vh;
        border-radius: 15px;
    }

    .history-modal-header {
        padding: 1rem 1.5rem;
    }

    .history-modal-header h2 {
        font-size: 1.2rem;
    }

    .transactions-panel,
    .notifications-panel {
        padding: 1.5rem;
    }

    .transaction-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .floating-history-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px 15px;
    }

    .history-modal-header h2 {
        font-size: 1rem;
    }

    .panel-title {
        font-size: 1.1rem;
    }

    .transaction-item,
    .notification-item {
        padding: 1rem;
    }
}

/* Custom Confirmation Modal */
.confirm-modal {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.confirm-modal.active {
    display: flex;
}

.confirm-modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: confirmSlideUp 0.3s ease-out;
    position: relative;
}

@keyframes confirmSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.confirm-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    animation: iconPulse 0.5s ease-out;
}

@keyframes iconPulse {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.confirm-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 1rem;
}

.confirm-message {
    color: #666;
    font-size: 1rem;
    text-align: center;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.confirm-actions {
    display: flex;
    gap: 1rem;
}

.confirm-btn {
    flex: 1;
    padding: 0.9rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.confirm-btn-cancel {
    background: #f0f0f0;
    color: #666;
}

.confirm-btn-cancel:hover {
    background: #e0e0e0;
    color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.confirm-btn-confirm {
    background: linear-gradient(135deg, #e60012, #cc0010);
    color: white;
    box-shadow: 0 4px 15px rgba(230, 0, 18, 0.3);
}

.confirm-btn-confirm:hover {
    background: linear-gradient(135deg, #ff0015, #e60012);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(230, 0, 18, 0.4);
}

.confirm-btn:active {
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 480px) {
    .confirm-modal-content {
        padding: 1.5rem;
        max-width: calc(100% - 2rem);
    }

    .confirm-title {
        font-size: 1.3rem;
    }

    .confirm-message {
        font-size: 0.95rem;
    }

    .confirm-actions {
        flex-direction: column;
    }

    .confirm-btn {
        width: 100%;
    }
}

/* Enhanced Notification Styles */
.notification-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.2rem;
    border-left: 4px solid #17a2b8;
    transition: all 0.3s ease;
}

.notification-item.completed-notification {
    border-left-color: #28a745;
    background: #f0f9f4;
}

.notification-item.cancelled-notification {
    border-left-color: #dc3545;
    background: #fef5f6;
}

.notification-item:hover {
    background: #e9ecef;
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.notification-item.completed-notification:hover {
    background: #e8f5ed;
}

.notification-item.cancelled-notification:hover {
    background: #fde8eb;
}

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.notification-service {
    font-size: 1.05rem;
    color: #1a1a1a;
}

.notification-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #666;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-row i {
    color: #e60012;
    width: 16px;
}

.notification-remarks {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #17a2b8;
    margin-top: 0.5rem;
}

.remarks-label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.5rem;
    color: #17a2b8;
}

.notification-remarks p {
    margin: 0;
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
}

.notification-receipt {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 2px dashed #28a745;
    margin-top: 0.5rem;
}

.receipt-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.8rem;
    color: #28a745;
    font-weight: 600;
}

.receipt-actions {
    display: flex;
    gap: 0.8rem;
}

.btn-view-receipt,
.btn-download-receipt {
    flex: 1;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-view-receipt {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.btn-view-receipt:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

.btn-download-receipt {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
}

.btn-download-receipt:hover {
    background: linear-gradient(135deg, #218838, #1e7e34);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Receipt Modal Styles */
.receipt-modal {
    display: flex;
    position: fixed;
    z-index: 3500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.receipt-modal-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
    animation: modalZoomIn 0.4s ease-out;
}

@keyframes modalZoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.receipt-modal-header {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
    border-bottom: 3px solid #e60012;
}

.receipt-modal-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.receipt-modal-header h3 i {
    color: #e60012;
}

.receipt-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.receipt-close-btn:hover {
    background: #e60012;
    transform: rotate(90deg);
}

.receipt-modal-body {
    flex: 1;
    overflow: auto;
    padding: 2rem;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.receipt-image {
    max-width: 100%;
    max-height: 600px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.receipt-image:hover {
    transform: scale(1.02);
}

.receipt-modal-footer {
    padding: 1.5rem 2rem;
    background: white;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 20px 20px;
    display: flex;
    justify-content: center;
}

.receipt-modal-footer .btn-download-receipt {
    padding: 0.8rem 2rem;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .receipt-modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .receipt-modal-header {
        padding: 1rem 1.5rem;
    }

    .receipt-modal-header h3 {
        font-size: 1.1rem;
    }

    .receipt-modal-body {
        padding: 1rem;
    }

    .receipt-actions {
        flex-direction: column;
    }

    .btn-view-receipt,
    .btn-download-receipt {
        width: 100%;
    }
}