/**
 * Frontend Styles for Sponsorship Asset Management
 * Material Design inspired frontend interface
 */

/* Container and grid */
.sam-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sam-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Card styles */
.sam-card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}

.sam-card:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.15), 0 16px 32px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Image container */
.sam-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    height: 200px;
}

.sam-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.sam-card:hover .sam-image-container img {
    transform: scale(1.05);
}

/* Price tag overlay */
.sam-price-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(33, 150, 243, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-weight: 500;
    font-size: 14px;
    backdrop-filter: blur(4px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card content */
.sam-card-content {
    padding: 20px;
}

.sam-card-content h3 {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
}

/* Sold card */
.sam-card--sold {
    opacity: 0.82;
}
.sam-card--sold .sam-image-container img {
    filter: grayscale(35%);
}
.sam-sold-ribbon {
    position: absolute;
    top: 16px;
    right: -8px;
    background: #c62828;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 18px 5px 14px;
    border-radius: 2px 0 0 2px;
    box-shadow: -2px 2px 6px rgba(0,0,0,.25);
}
.sam-sold-ribbon::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 0;
    border-style: solid;
    border-width: 13px 8px 13px 0;
    border-color: transparent #8b0000 transparent transparent;
    filter: brightness(0.7);
}

/* Status badges */
.sam-status-available {
    background: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 12px;
}

.sam-status-sold {
    background: #f44336;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 12px;
}

/* ── Inquiry Modal ─────────────────────────────────────── */
.sam-inquiry-modal {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 999999 !important;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}
.sam-inquiry-modal.sam-inquiry-modal--open {
    display: flex !important;
}
.sam-inquiry-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 32px;
    box-sizing: border-box;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    margin: auto;
}
.sam-inquiry-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 12px;
}
.sam-inquiry-modal-title {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
}
.sam-inquiry-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    flex-shrink: 0;
    margin-top: -4px;
}
.sam-inquiry-modal-close:hover { color: #333; }
/* GDPR consent block */
.sam-gdpr-consent {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
}
.sam-gdpr-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}
.sam-gdpr-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #1976d2;
}
.sam-gdpr-label a {
    color: #1976d2;
}
.sam-gdpr-error {
    color: #c62828;
    font-size: 12px;
    font-weight: 500;
    margin-top: 8px;
    padding-left: 28px;
}

.sam-inquiry-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}
.sam-inquiry-submit { flex: 1; }
.sam-inquiry-cancel { flex: 1; background: #666 !important; }

/* Slots mini-bar (public shop card) */
.sam-slots-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}
.sam-slots-mini-bar {
    height: 5px;
    background: #e0e0e0;
    border-radius: 100px;
    overflow: hidden;
}
.sam-slots-mini-fill {
    height: 100%;
    border-radius: 100px;
    background: #2e7d32;
    transition: width .3s;
}
.sam-slots-mini-fill--warn { background: #f57c00; }
.sam-slots-mini-fill--full { background: #c62828; }
.sam-slots-text { font-size: 12px; color: #9e9e9e; }

/* Asset details */
.sam-card-content p {
    margin: 8px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.sam-card-content p strong {
    color: #333;
    font-weight: 500;
}

/* Button styles */
.sam-btn {
    background: linear-gradient(45deg, #2196F3, #1976D2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    text-align: center;
}

.sam-btn:hover {
    background: linear-gradient(45deg, #1976D2, #1565C0);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.4);
    transform: translateY(-1px);
    color: white;
    text-decoration: none;
}

.sam-btn-secondary {
    background: linear-gradient(45deg, #FF9800, #F57C00);
    box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.sam-btn-secondary:hover {
    background: linear-gradient(45deg, #F57C00, #E65100);
    box-shadow: 0 4px 8px rgba(255, 152, 0, 0.4);
}

/* Shop header */
.sam-shop-header {
    text-align: center;
    margin-bottom: 40px;
}

.sam-shop-header h2 {
    margin: 0 0 16px 0;
    font-size: 2.5rem;
    font-weight: 300;
    color: #333;
    line-height: 1.2;
}

.sam-shop-header p {
    margin: 0;
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Modal styles */
.sam-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sam-modal.sam-modal-active {
    display: flex;
    opacity: 1;
}

.sam-modal-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.sam-modal.sam-modal-active .sam-modal-content {
    transform: scale(1);
}

.sam-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sam-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
    color: #333;
}

.sam-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.sam-modal-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Form styles */
.sam-form-group {
    margin-bottom: 20px;
}

.sam-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.sam-form-group input,
.sam-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.sam-form-group input:focus,
.sam-form-group textarea:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.sam-form-actions {
    display: flex;
    gap: 12px;
}

.sam-form-actions .sam-btn {
    flex: 1;
}

/* Asset detail page */
.sam-asset-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.sam-asset-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.sam-asset-info h1 {
    margin: 0 0 20px 0;
    font-size: 2rem;
    font-weight: 500;
    color: #333;
    line-height: 1.2;
}

.sam-asset-details {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sam-asset-details p {
    margin: 8px 0;
    color: #555;
}

.sam-asset-details strong {
    color: #333;
    font-weight: 500;
}

.sam-asset-description {
    margin-bottom: 30px;
    line-height: 1.6;
    color: #555;
}

.sam-asset-description h1,
.sam-asset-description h2,
.sam-asset-description h3,
.sam-asset-description h4,
.sam-asset-description h5,
.sam-asset-description h6 {
    color: #333;
    margin-top: 24px;
    margin-bottom: 12px;
}

.sam-asset-description ul,
.sam-asset-description ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.sam-asset-description li {
    margin-bottom: 4px;
}

/* Dashboard styles */
.sam-dashboard-header {
    margin-bottom: 30px;
    text-align: center;
}

.sam-dashboard-header h2 {
    margin: 0 0 10px 0;
    font-size: 2rem;
    font-weight: 500;
    color: #333;
}

.sam-dashboard-header p {
    margin: 0;
    color: #666;
    font-size: 1.1rem;
}

.sam-no-assets {
    text-align: center;
    padding: 40px;
    background: #f5f5f5;
    border-radius: 8px;
    color: #666;
}

.sam-no-assets p {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
}

/* Load more button */
.sam-load-more {
    text-align: center;
    margin-top: 40px;
}

.sam-load-more-btn {
    background: linear-gradient(45deg, #9C27B0, #7B1FA2);
    box-shadow: 0 2px 4px rgba(156, 39, 176, 0.3);
}

.sam-load-more-btn:hover {
    background: linear-gradient(45deg, #7B1FA2, #6A1B9A);
    box-shadow: 0 4px 8px rgba(156, 39, 176, 0.4);
}

/* Loading state */
.sam-loading {
    opacity: 0.6;
    pointer-events: none;
}

.sam-loading .sam-btn {
    position: relative;
}

.sam-loading .sam-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: sam-spin 1s linear infinite;
}

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

/* Success/error messages */
.sam-message {
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

.sam-message.sam-success {
    background: #e8f5e8;
    color: #2e7d32;
    border-left: 4px solid #4CAF50;
}

.sam-message.sam-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

/* Responsive design */
@media (max-width: 768px) {
    .sam-container {
        padding: 0 16px;
    }
    
    .sam-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .sam-shop-header h2 {
        font-size: 2rem;
    }
    
    .sam-asset-detail {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .sam-modal-content {
        padding: 24px;
        margin: 20px;
    }
    
    .sam-form-actions {
        flex-direction: column;
    }
    
    .sam-card-content {
        padding: 16px;
    }
    
    .sam-card-content h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .sam-shop-header h2 {
        font-size: 1.75rem;
    }
    
    .sam-shop-header p {
        font-size: 1rem;
    }
    
    .sam-asset-info h1 {
        font-size: 1.5rem;
    }
    
    .sam-modal-content {
        padding: 20px;
        margin: 16px;
    }
}
