/* Tactiles Brewger - Global Styles */
:root {
    --primary-color: #1a73e8; /* Google Blue */
    --primary-hover: #1765cc;
    --text-color: #3c4043;
    --text-muted: #70757a;
    --border-color: #dadce0;
    --bg-color: #ffffff;
    --bg-alt: #f8f9fa;
    --error-color: #d93025;
    --success-color: #1e8e3e;
    --font-family: 'Roboto', 'Arial', sans-serif;
    --shadow-subtle: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
}

.tactiles-form-container {
    max-width: 800px;
    margin: 2rem auto;
    background: var(--bg-color);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-family: var(--font-family);
    color: var(--text-color);
}

.form-title {
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--text-color);
    text-align: center;
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26,115,232,0.1);
}

.remark {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Radio & Checkbox Groups */
.radio-group, .checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
}

.radio-group label, .checkbox-grid label {
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 0.95rem;
    cursor: pointer;
}

.radio-group input, .checkbox-grid input {
    margin-right: 8px;
    accent-color: var(--primary-color);
}

/* Buttons */
.btn-submit {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
}

.btn-submit:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

/* Responsive */
/* Single Post Styles */
.tactile-single-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
    font-family: var(--font-family);
    color: var(--text-color);
}

.tactile-header-image {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-subtle);
}

.tactile-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tactile-infobox {
    background: var(--bg-alt);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.info-item strong {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.tactile-content-section h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 3rem 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.file-list {
    list-style: none;
    padding: 0;
}

.file-list li {
    padding: 12px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-list li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.download-all-container {
    margin-top: 1.5rem;
    text-align: center;
}

/* Grid & Sidebar Layout Redesign */
.tactiles-overview-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.tactiles-sidebar {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    height: fit-content;
    position: sticky;
    top: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--text-color);
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.filter-search input {
    width: 100%;
    max-width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    font-size: 0.95rem;
    box-sizing: border-box;
    display: block;.bundle-status-msg {
    margin-top: 15px;
    padding: 12px;
    background: #f1f3f4;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #5f6368;
    text-align: center;
    border: 1px solid #dadce0;
}
.bundle-status-msg.neutral {
    background: transparent;
    border: none;
    padding: 0;
}
}

.filter-checkbox-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.filter-checkbox-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    padding: 6px 0;
    cursor: pointer;
    color: #555;
    transition: color 0.2s;
}

.filter-checkbox-list label:hover {
    color: var(--primary-color);
}

.filter-checkbox-list input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 5px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.tactiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    transition: opacity 0.3s ease;
}

#tactiles-grid-status {
    height: 0;
    position: relative;
    z-index: 10;
}

#tactiles-grid-status .grid-loader {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
    white-space: nowrap;
}

/* Mobile Responsiveness for Layout */
@media (max-width: 1024px) {
    .tactiles-overview-container {
        grid-template-columns: 1fr;
    }
    .tactiles-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
}

.tactile-card {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tactile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(60,64,67,0.15);
}

.card-image {
    height: 180px;
    overflow: hidden;
    background: var(--bg-alt);
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 1.25rem;
}

.card-category {
    font-size: 0.75rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.card-title {
    font-size: 1.15rem;
    margin: 0 0 8px;
    font-weight: 500;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Dashboard Styles */
.tactiles-dashboard {
    max-width: 1000px;
    margin: 2rem auto;
}

.tactiles-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.tactiles-table th {
    background: var(--bg-alt);
    text-align: left;
    padding: 12px 16px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}

.tactiles-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.tactiles-table tr:last-child td {
    border-bottom: none;
}

.tactiles-table img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-edit, .btn-delete, .btn-secondary {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: white;
    transition: background 0.2s;
}

.btn-edit:hover {
    background: var(--bg-alt);
}

.btn-delete {
    color: var(--error-color);
    border-color: rgba(217, 48, 37, 0.2);
}

.btn-delete:hover {
    background: rgba(217, 48, 37, 0.05);
}

.btn-secondary {
    display: block;
    margin: 2rem auto;
    padding: 10px 24px;
    border-radius: 24px;
    background: var(--primary-color);
    color: white;
    border: none;
}

/* Loader Styles */
.btn-loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

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

.success-msg { color: var(--success-color); margin-top: 1rem; text-align: center; }
.error-msg { color: var(--error-color); margin-top: 1rem; text-align: center; }

/* File Management in Form */
.existing-file-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    position: relative;
    max-width: 100%;
}

.existing-file-item img {
    border-radius: 4px;
    object-fit: cover;
}

.existing-file-item .file-name {
    font-size: 14px;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.btn-remove-file {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}

.btn-remove-file:hover {
    background: #c82333;
}

.existing-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

/* PDF Viewer Premium Styles */
#tactile-pdf-viewer {
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 15px;
}

.pdf-render-wrapper {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 4px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

#pdf-render-canvas {
    max-width: 100%;
    height: auto !important;
    display: block;
}

.pdf-controls {
    display: none; /* Shown via JS */
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.pdf-btn {
    background: #1a73e8;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    line-height: 1;
}

.pdf-btn:hover {
    background: #1557b0;
    transform: translateY(-1px);
}

.pdf-count {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}
/* 3D Viewer Controls Overlay */
#tactile-3d-viewer {
    position: relative;
    overflow: hidden;
}

.tactile-viewer-controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 6px 15px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0,0,0,0.05);
}

.viewer-btn {
    background: transparent;
    border: none;
    color: #333;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer-btn:hover {
    background: #f0f0f0;
    color: var(--primary-color);
}

.viewer-btn.active {
    color: var(--primary-color);
    background: #eef5ff;
}

.viewer-btn-sep {
    width: 1px;
    height: 20px;
    background: #ddd;
    margin: 5px 2px;
}
