/**
 * Egg Rate Export Styles
 * 
 * Styles for export buttons, spinners, and toast notifications
 */

/* Export Buttons */
.mkisan-export-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-export-excel,
.btn-export-whatsapp,
.btn-export-history,
.btn-export-comparison {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-export-excel {
    background: linear-gradient(135deg, #1e7e34 0%, #28a745 100%);
    color: white;
}

.btn-export-excel:hover {
    background: linear-gradient(135deg, #155724 0%, #1e7e34 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 126, 52, 0.4);
}

.btn-export-whatsapp {
    background: linear-gradient(135deg, #128C7E 0%, #25D366 100%);
    color: white;
}

.btn-export-whatsapp:hover {
    background: linear-gradient(135deg, #0f7268 0%, #1fb855 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.btn-export-history {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-export-history:hover {
    background: linear-gradient(135deg, #5568d3 0%, #63408a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-export-comparison {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-export-comparison:hover {
    background: linear-gradient(135deg, #e67ee8 0%, #e24556 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
}

.btn-export-excel:disabled,
.btn-export-whatsapp:disabled,
.btn-export-history:disabled,
.btn-export-comparison:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Spinner Animation */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spinner-rotate 0.6s linear infinite;
}

@keyframes spinner-rotate {
    to { transform: rotate(360deg); }
}

/* Toast Notifications */
.mkisan-toast {
    position: fixed;
    bottom: -100px;
    right: 20px;
    background: white;
    color: #333;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    z-index: 9999;
    transition: all 0.3s ease;
}

.mkisan-toast.show {
    bottom: 30px;
}

.mkisan-toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    flex-shrink: 0;
}

.mkisan-toast-success .mkisan-toast-icon {
    background: #28a745;
    color: white;
}

.mkisan-toast-info .mkisan-toast-icon {
    background: #17a2b8;
    color: white;
}

.mkisan-toast-warning .mkisan-toast-icon {
    background: #ffc107;
    color: #333;
}

.mkisan-toast-error .mkisan-toast-icon {
    background: #dc3545;
    color: white;
}

.mkisan-toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

/* Export Section in Tables */
.mkisan-table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.mkisan-table-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mkisan-export-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-export-excel,
    .btn-export-whatsapp,
    .btn-export-history,
    .btn-export-comparison {
        width: 100%;
        justify-content: center;
    }
    
    .mkisan-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
    
    .mkisan-toast.show {
        bottom: 20px;
    }
    
    .mkisan-table-actions {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .mkisan-table-title {
        font-size: 16px;
    }
}

/* Print styles - hide export buttons when printing */
@media print {
    .mkisan-export-buttons,
    .btn-export-excel,
    .btn-export-whatsapp,
    .btn-export-history,
    .btn-export-comparison,
    .mkisan-toast {
        display: none !important;
    }
}

/* Loading State Overlay */
.mkisan-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.mkisan-loading-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.mkisan-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spinner-rotate 0.8s linear infinite;
    margin: 0 auto 15px;
}

.mkisan-loading-text {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Export Icons */
.export-icon {
    font-size: 16px;
}

/* Bulk Export Section */
.mkisan-bulk-export {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    text-align: center;
}

.mkisan-bulk-export h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.mkisan-bulk-export p {
    font-size: 14px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.mkisan-bulk-export .mkisan-export-buttons {
    justify-content: center;
}

.mkisan-bulk-export .btn-export-excel,
.mkisan-bulk-export .btn-export-whatsapp {
    background: white;
    color: #667eea;
}

.mkisan-bulk-export .btn-export-excel:hover,
.mkisan-bulk-export .btn-export-whatsapp:hover {
    background: rgba(255, 255, 255, 0.9);
    color: #5568d3;
}

/* Download Progress Bar */
.mkisan-progress {
    width: 100%;
    height: 4px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 10px;
}

.mkisan-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: progress-pulse 1.5s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Export Success Message */
.mkisan-export-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mkisan-export-success-icon {
    font-size: 20px;
}

/* Floating Action Button for Quick Export */
.mkisan-fab-export {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #1e7e34 0%, #28a745 100%);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(30, 126, 52, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 1000;
}

.mkisan-fab-export:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(30, 126, 52, 0.5);
}

.mkisan-fab-export:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .mkisan-fab-export {
        bottom: 70px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}
