/* ============================================
   Saved Quotes Page Styles
   Matches current design scheme
   ============================================ */

.saved-quotes-page {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* ============================================
   Two-Panel Layout
   ============================================ */

.saved-quotes-panels {
    display: flex;
    gap: var(--spacing-md);
    width: 100%;
    height: calc(100vh - 8rem); /* Adjust based on header height */
}

.saved-quotes-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border-radius: 0;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.panel-content {
    padding: var(--spacing-md);
    overflow-y: auto;
    height: 100%;
}

.panel-content::-webkit-scrollbar {
    width: 8px;
}

.panel-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.panel-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.panel-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--color-text-secondary);
}

.panel-placeholder p {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.panel-placeholder .placeholder-subtitle {
    font-size: var(--font-size-sm);
    font-weight: 400;
    color: var(--color-text-secondary);
}

/* ============================================
   Search Section
   ============================================ */

.saved-quotes-search {
    position: relative;
    margin-bottom: 0.75rem;
    max-width: 300px;
}

.saved-quotes-search-input {
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    font-size: 0.75rem;
    font-family: inherit;
    background: var(--color-surface);
    color: var(--color-text-primary);
    transition: all var(--transition-fast);
    box-sizing: border-box;
    height: 2.5rem;
}

.saved-quotes-search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 0 0 2px rgba(123, 44, 191, 0.1);
}

.saved-quotes-search-input::placeholder {
    color: var(--color-text-secondary);
    font-weight: 400;
}

.saved-quotes-search .search-icon {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-secondary);
    pointer-events: none;
    transition: color var(--transition-fast);
    width: 14px;
    height: 14px;
}

.saved-quotes-search-input:focus + .search-icon,
.saved-quotes-search:has(.saved-quotes-search-input:focus) .search-icon {
    color: var(--color-primary);
}

/* ============================================
   Loading, Error, Empty States
   ============================================ */

.loading-indicator {
    text-align: center;
    padding: 1rem;
    color: var(--color-text-secondary);
    font-size: 0.75rem;
}

.error-message {
    padding: 0.75rem;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 0;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    border: 1px solid #fecaca;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--color-text-secondary);
    font-size: 0.75rem;
}

/* ============================================
   Results List
   ============================================ */

.saved-quotes-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.saved-quote-item {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--color-surface);
    position: relative;
}

.saved-quote-item:hover {
    border-color: var(--color-primary);
    background: rgba(123, 44, 191, 0.03);
}

.saved-quote-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
    gap: 0.5rem;
}

.saved-quote-item-actions {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
}

.saved-quote-item-title {
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--color-text-primary);
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.saved-quote-item-status {
    padding: 0.25rem 0.5rem;
    border-radius: 0;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.saved-quote-item-status.draft {
    background: #fef3c7;
    color: #92400e;
}

.saved-quote-item-status.final {
    background: #d1fae5;
    color: #065f46;
}

.saved-quote-item-status.archived {
    background: #e5e7eb;
    color: #374151;
}

.saved-quote-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--color-border);
}

.saved-quote-item-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.saved-quote-item-date {
    font-weight: 500;
}

.saved-quote-delete-btn {
    background: transparent;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: var(--color-text-secondary);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
    opacity: 0.6;
    width: 1.5rem;
    height: 1.5rem;
}

.saved-quote-delete-btn:hover {
    color: #dc2626;
    opacity: 1;
}

.saved-quote-delete-btn:active {
    transform: scale(0.95);
}

.saved-quote-delete-btn svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   Quote View Modal
   ============================================ */

.quote-view-modal-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: 10000;
    padding: var(--spacing-md);
}

.quote-view-modal-content {
    background: var(--color-surface);
    border-radius: 0;
    width: 95%;
    max-width: 1600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid var(--color-border);
}

.quote-view-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-border);
    background: rgba(123, 44, 191, 0.05);
    flex-shrink: 0;
}

.quote-view-modal-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}

.quote-view-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: color var(--transition-fast);
    line-height: 1;
}

.quote-view-modal-close:hover {
    color: var(--color-text-primary);
}

.quote-view-modal-body {
    display: flex;
    flex-direction: column;
    padding: var(--spacing-md);
    overflow: hidden;
    flex: 1;
    min-height: 0;
}

.quote-view-panel {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
    border-radius: 0;
    overflow: hidden;
    background: var(--color-surface);
    flex: 1;
    width: 100%;
}

.quote-view-panel-header {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
    background: rgba(123, 44, 191, 0.03);
    flex-shrink: 0;
}

.quote-view-panel-header h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.quote-view-panel-content {
    padding: var(--spacing-md);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.quote-view-panel-content::-webkit-scrollbar {
    width: 8px;
}

.quote-view-panel-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.quote-view-panel-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.quote-view-panel-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Quote Data Display */
.quote-data-display {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.quote-info-section {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
    background: rgba(123, 44, 191, 0.02);
    border: 1px solid var(--color-border);
    border-radius: 0;
}

.quote-info-item {
    font-size: 0.75rem;
    color: var(--color-text-primary);
}

.quote-info-item strong {
    color: var(--color-text-secondary);
    margin-right: 0.25rem;
}

.quote-table-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: var(--spacing-md);
}

.quote-table-section h4,
.quote-table-section .section-title {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
}

.section-header-with-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.section-header-with-info .section-title {
    margin: 0;
}

.overall-pcr-display {
    font-size: 0.875rem;
    font-weight: 700;
    color: #7c3aed; /* Purple color for visibility */
    padding: 0.375rem 0.75rem;
    background: rgba(124, 58, 237, 0.1);
    border: 2px solid #7c3aed;
    border-radius: 0;
    white-space: nowrap;
}

.overall-pcr-display strong {
    color: #7c3aed;
    margin-right: 0.375rem;
    font-weight: 700;
}

.quote-table-wrapper {
    overflow-x: auto;
}

.quote-data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.quote-data-table thead {
    background: rgba(123, 44, 191, 0.05);
}

.quote-data-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    white-space: nowrap;
}

.quote-data-table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

.quote-data-table tbody tr:hover {
    background: rgba(123, 44, 191, 0.02);
}

.quote-loading,
.quote-error,
.quote-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.75rem;
}

.quote-error {
    color: #dc2626;
}

.quote-placeholder .placeholder-subtitle {
    font-size: 0.7rem;
    margin-top: 0.5rem;
    color: var(--color-text-secondary);
}

/* Actual Quote Section */
.actual-quote-section {
    margin-top: var(--spacing-lg);
    border-top: 2px solid var(--color-border);
    padding-top: var(--spacing-md);
}

.actual-quote-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
}

.actual-quote-table thead {
    background: rgba(123, 44, 191, 0.05);
}

.actual-quote-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
    white-space: nowrap;
}

.actual-quote-table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
}

.actual-quote-table tbody tr:hover {
    background: rgba(123, 44, 191, 0.02);
}

.quote-placeholder-cell {
    text-align: center;
    padding: 2rem !important;
}

