/* ================================
   SHARED STYLES
   Common styles for model_viewer_ai.html and ai_render_model_pro.html
   ================================ */

/* Scrollbar Hiding */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Model Viewer */
model-viewer {
    width: 100%;
    height: 100%;
    --poster-color: transparent;
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

model-viewer.ready {
    opacity: 1;
}

model-viewer::part(default-ar-button) {
    display: none;
}

/* Toast Notifications */
.viewer-toast {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    white-space: nowrap;
    backdrop-filter: blur(4px);
}

.viewer-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Modal Styles */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.open {
    display: flex;
    opacity: 1;
}

.modal-card {
    background: white;
    padding: 24px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal.open .modal-card {
    transform: scale(1);
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Button Styles */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 8px 16px;
    background: #f3f4f6;
    color: #374151;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Credit Badge */
.credit-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

/* Pro badge */
.pro-badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Package Cards */
.package-card {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.package-card:hover {
    border-color: #8b5cf6;
}

.package-card.selected {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(99, 102, 241, 0.1) 100%);
}

/* AI Model buttons */
.ai-model-btn {
    transition: all 0.2s;
}

.ai-model-btn.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
    border-color: #8b5cf6 !important;
}

.ai-model-btn.active span {
    color: white !important;
}

/* Resolution buttons */
.resolution-btn {
    transition: all 0.2s;
}

.resolution-btn.active {
    background: #8b5cf6 !important;
    color: white !important;
    border-color: #8b5cf6 !important;
}

.resolution-btn.active span {
    color: white !important;
}

/* Ratio buttons */
.ratio-btn {
    transition: all 0.2s;
}

.ratio-btn.active {
    background: #8b5cf6 !important;
    color: white !important;
    border-color: #8b5cf6 !important;
}

/* Product count buttons */
.product-count-btn {
    transition: all 0.2s;
}

.product-count-btn.active {
    background: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
}

.product-count-btn.active span {
    color: white !important;
}

/* Angle count buttons */
.angle-count-btn {
    transition: all 0.2s;
}

.angle-count-btn.active {
    background: #8b5cf6 !important;
    border-color: #8b5cf6 !important;
}

.angle-count-btn.active span {
    color: white !important;
}

/* Model Upload Area */
.model-upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.model-upload-area:hover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.05);
}

.model-upload-area.dragover {
    border-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.model-upload-area.has-model {
    border-style: solid;
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

/* Empty state for model viewer */
.empty-model-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9ca3af;
}
