/**
 * Quick View Modal Styles
 *
 * @package SDAS_Inventory
 */

/* Modal Overlay */
.sdas-quick-view-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.sdas-quick-view-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.sdas-quick-view-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.sdas-quick-view-modal > .sdas-quick-view-content {
    overflow-y: auto;
    max-height: 90vh;
}

.sdas-quick-view-overlay.active .sdas-quick-view-modal {
    transform: scale(1);
}

/* Close Button */
.sdas-quick-view-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.sdas-quick-view-close:hover {
    background: rgba(0, 0, 0, 0.7);
}

.sdas-quick-view-close::before {
    content: "×";
}

/* Loading State */
.sdas-quick-view-loading {
    padding: 3rem;
    text-align: center;
    color: #666;
}

.sdas-quick-view-loading::after {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4caf50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Quick View Content */
.sdas-quick-view-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 0;
    padding: 0;
    min-height: 500px;
}

.sdas-quick-view-image {
    width: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.sdas-quick-view-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sdas-quick-view-info {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    background: #fff;
}

.sdas-quick-view-title {
    margin: 0 0 0.5rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
}

.sdas-quick-view-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.sdas-quick-view-title a:hover {
    color: #137ac3;
}

.sdas-quick-view-price {
    font-size: 2.25rem;
    font-weight: 800;
    color: #137ac3;
    margin-bottom: 1.5rem;
    letter-spacing: -0.5px;
}

.sdas-quick-view-specs {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
    margin-bottom: 1.5rem;
}

.sdas-quick-view-specs-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid #e5e7eb;
}

.sdas-quick-view-spec {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid #e5e7eb;
    background: transparent;
}

.sdas-spec-label {
    font-weight: 500;
    color: #6b7280;
    font-size: 0.9375rem;
    text-transform: none;
    letter-spacing: 0;
    flex-shrink: 0;
}

.sdas-spec-value {
    color: #1a1a1a;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: right;
}

.sdas-quick-view-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0;
}

.sdas-quick-view-actions > *:first-child {
    grid-column: 1 / -1;
}

.sdas-quick-view-btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    line-height: 1;
}

.sdas-quick-view-btn-primary {
    background: #137ac3;
    color: #fff !important;
    box-shadow: 0 1px 3px rgba(19, 122, 195, 0.3);
}

.sdas-quick-view-btn-primary:hover {
    background: #0d5a8a;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(19, 122, 195, 0.4);
}

.sdas-quick-view-btn-primary:visited {
    color: #fff !important;
}

.sdas-quick-view-btn-primary:focus {
    color: #fff !important;
    outline: 2px solid #137ac3;
    outline-offset: 2px;
}

.sdas-quick-view-btn-secondary {
    background: #fff;
    color: #374151;
    border: 1.5px solid #d1d5db;
}

.sdas-quick-view-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #1a1a1a;
}

/* Quick View Button on Cards */
.sdas-quick-view-button {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    color: #333;
}

.sdas-quick-view-button:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* Responsive Design */
@media (max-width: 900px) {
    .sdas-quick-view-content {
        grid-template-columns: 350px 1fr;
    }
}

@media (max-width: 768px) {
    .sdas-quick-view-modal {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 0;
    }

    .sdas-quick-view-content {
        grid-template-columns: 1fr;
        gap: 0;
        min-height: auto;
    }

    .sdas-quick-view-image {
        padding: 1.5rem;
        min-height: 250px;
    }

    .sdas-quick-view-info {
        padding: 1.5rem;
    }

    .sdas-quick-view-title {
        font-size: 1.5rem;
    }

    .sdas-quick-view-price {
        font-size: 1.875rem;
    }

    .sdas-quick-view-actions {
        grid-template-columns: 1fr;
    }

    .sdas-quick-view-actions > *:first-child {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    .sdas-quick-view-image {
        padding: 1rem;
        min-height: 200px;
    }

    .sdas-quick-view-info {
        padding: 1rem;
    }

    .sdas-quick-view-title {
        font-size: 1.25rem;
    }

    .sdas-quick-view-price {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .sdas-quick-view-spec {
        padding: 0.75rem 0;
    }

    .sdas-spec-label,
    .sdas-spec-value {
        font-size: 0.875rem;
    }

    .sdas-quick-view-btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Prevent body scroll when modal is open */
body.sdas-quick-view-open {
    overflow: hidden;
}

