/* Assistant Cortex Pricing Display Styles */

/* Container */
.ac-pricing-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

/* Header */
.ac-pricing-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.ac-pricing-header h1 {
    margin: 0 0 10px 0;
    font-size: 2.5em;
    font-weight: 700;
}

.ac-pricing-header p {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    opacity: 0.9;
}

/* Refresh Button */
.ac-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    color: white;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ac-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.ac-refresh-icon {
    font-size: 1.2em;
}

/* Controls */
.ac-pricing-controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.ac-search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
    min-width: 250px;
}

.ac-search-box input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.ac-search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.ac-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2em;
}

.ac-category-filter select {
    padding: 12px 40px 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1em;
    cursor: pointer;
    background: white;
    transition: border-color 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.ac-category-filter select:focus {
    outline: none;
    border-color: #667eea;
}

/* Table View */
.ac-pricing-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ac-pricing-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 800px;
}

.ac-pricing-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.ac-pricing-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95em;
}

.ac-pricing-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.ac-pricing-table tbody tr {
    transition: background-color 0.2s ease;
}

.ac-pricing-table tbody tr:hover {
    background-color: #f5f5f5;
}

.ac-pricing-table .model-key {
    font-weight: 600;
    color: #333;
    font-size: 1em;
}

.ac-pricing-table .price-cell {
    font-weight: 600;
    color: #2ecc71;
}

.ac-pricing-table .pricing-type {
    font-size: 0.85em;
    color: #666;
}

/* Category Badge in Table */
.ac-pricing-table .ac-category-badge {
    display: inline-block;
    padding: 4px 12px;
    background: #e8f4f8;
    color: #0073aa;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

/* Cards View */
.ac-pricing-category-section {
    margin-bottom: 40px;
}

.ac-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

.ac-category-icon {
    font-size: 1.2em;
}

.ac-pricing-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.ac-pricing-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ac-pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.ac-pricing-card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
}

.ac-pricing-card-title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    flex: 1;
}

.ac-pricing-category-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.ac-pricing-card-body {
    padding: 20px;
}

.ac-pricing-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ac-pricing-detail-row:last-child {
    border-bottom: none;
}

.ac-pricing-label {
    font-weight: 500;
    color: #666;
}

.ac-pricing-value {
    font-weight: 600;
    color: #2ecc71;
}

/* Error Message */
.ac-pricing-error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Loading Overlay */
.ac-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.ac-loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: ac-spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes ac-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ac-loading-overlay p {
    color: white;
    font-size: 1.1em;
}

/* Search Highlight */
.ac-pricing-row.highlight,
.ac-pricing-card.highlight {
    background-color: #fff3cd !important;
    border: 2px solid #ffc107;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ac-pricing-header h1 {
        font-size: 1.8em;
    }
    
    .ac-pricing-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ac-search-box {
        max-width: 100%;
    }
    
    .ac-pricing-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .ac-pricing-card-header {
        flex-direction: column;
    }
}

/* Filter Active State */
.ac-pricing-row.filtered,
.ac-pricing-card.filtered {
    display: none;
}

/* Pagination (table view) */
.ac-pricing-row.ac-page-hidden {
    display: none;
}

.ac-pricing-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.ac-page-btn {
    padding: 10px 22px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    color: #fff;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ac-page-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.35);
}

.ac-page-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.ac-page-status {
    color: #666;
    font-size: 0.95em;
}
