/* Quotes Manager - Public Styles */

/* All Quotes Grid */
.qm-all-quotes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.qm-quotes-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 15px;
}

.qm-filters-left { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }

.qm-filter-select,
.qm-search-input {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 150px;
    color: #2c3e50 !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #2c3e50; /* ensure visibility on WebKit */
}

/* Ensure placeholder and selected text are clearly visible */
.qm-search-input::placeholder {
    color: #9aa4af;
    opacity: 1;
}

select.qm-filter-select option { color: #2c3e50; background-color: #ffffff; }
select.qm-filter-select:focus { color: #2c3e50 !important; }
select.qm-filter-select::-ms-value { color: #2c3e50; background: #ffffff; }

/* Ensure dropdown controls don't inherit low-contrast styles from themes */
.qm-quotes-filters select,
.qm-quotes-filters input[type="text"] {
    color: #2c3e50 !important;
    background-color: #ffffff !important;
}

.qm-search-container {
    display: flex;
    gap: 5px;
}

.qm-search-btn,
.qm-clear-filters-btn {
    padding: 8px 16px;
    border: 1px solid #007cba;
    background: #007cba;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.qm-search-btn:hover,
.qm-clear-filters-btn:hover {
    background: #005a87;
    border-color: #005a87;
}

.qm-quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.qm-quote-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.qm-quote-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.qm-quote-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.qm-quote-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.qm-quote-card:hover .qm-quote-image img {
    transform: scale(1.05);
}

.qm-quote-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
}

.qm-quote-content {
    padding: 20px;
}

.qm-quote-text {
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 400;
}

.qm-quote-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.qm-quote-date {
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.qm-quote-share {
    display: flex;
    gap: 8px;
}

.qm-share-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

.qm-share-link:hover {
    transform: scale(1.1);
    color: white;
}

.qm-facebook {
    background: #3b5998;
}

.qm-twitter {
    background: #1da1f2;
}

.qm-linkedin {
    background: #0077b5;
}

.qm-whatsapp {
    background: #25d366;
}

.qm-load-more-container {
    text-align: center;
    margin-top: 30px;
}

.qm-load-more-btn {
    padding: 12px 30px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qm-load-more-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
}

.qm-no-quotes {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
    grid-column: 1 / -1;
}

/* Shared Quote Styles */
.qm-shared-quote-container {
    max-width: 800px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.qm-shared-quote-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.qm-shared-quote-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.qm-shared-quote-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qm-shared-quote-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 64px;
}

.qm-shared-quote-content {
    padding: 30px;
}

.qm-shared-quote-text {
    font-size: 20px;
    line-height: 1.6;
    color: #2c3e50;
    margin-bottom: 20px;
    font-weight: 400;
}

.qm-shared-quote-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.qm-shared-quote-date {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

.qm-shared-quote-share {
    display: flex;
    gap: 10px;
}

.qm-more-quotes-section {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
}

.qm-more-quotes-header h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 24px;
}

.qm-more-quotes-header p {
    margin: 0 0 30px 0;
    color: #666;
    font-size: 16px;
}

.qm-more-quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.qm-more-quote-preview {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.qm-more-quote-preview:hover {
    transform: translateY(-3px);
}

.qm-more-quote-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.qm-more-quote-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.qm-more-quote-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qm-more-quote-text {
    padding: 15px;
}

.qm-more-quote-text h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #2c3e50;
}

.qm-more-quote-text p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.qm-view-all-quotes-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #007cba;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.qm-view-all-quotes-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .qm-quotes-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .qm-filters-left,
    .qm-filters-right {
        justify-content: center;
    }
    
    .qm-quotes-grid {
        grid-template-columns: 1fr;
    }
    
    .qm-more-quotes-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.qm-loading {
    opacity: 0.6;
    pointer-events: none;
}

.qm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: qm-spin 1s linear infinite;
}

@keyframes qm-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.qm-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
    text-align: center;
}