/* category.css - Common styles for all drawing category pages */

:root {
    --primary-color: #4a6fa5;
    --secondary-color: #ff7b54;
    --light-bg: #f8f9fa;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --header-height: 56px;
    --toolbar-height: 70px;

    /* Font Sizes - Consistent for AdSense */
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-base: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;
    --font-3xl: 1.875rem;
}

* {
    box-sizing: border-box;
}

/* Base font settings for AdSense compliance */
body {
    background-color: var(--light-bg);
    height: 100vh;
    overflow: hidden;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    font-size: var(--font-base);
    line-height: 1.5;
    color: #333;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Consistent heading styles */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
    font-family: 'Poppins', sans-serif;
    color: #333;
}

h1 {
    font-size: var(--font-3xl);
}

h2 {
    font-size: var(--font-2xl);
}

h3 {
    font-size: var(--font-xl);
}

h4 {
    font-size: var(--font-lg);
}

h5 {
    font-size: var(--font-base);
}

h6 {
    font-size: var(--font-sm);
}

/* Header */
.header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

.logo {
    font-weight: bold;
    font-size: var(--font-xl);
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
}

.logo img {
    height: 40px;
}

.header-buttons {
    display: flex;
    gap: 10px;
}

/* Sidebar */
.sidebar {
    background-color: white;
    box-shadow: var(--card-shadow);
    height: calc(100vh - var(--header-height) - var(--toolbar-height));
    display: flex;
    flex-direction: column;
    position: fixed;
    left: -100%;
    top: var(--header-height);
    width: 280px;
    z-index: 1001;
    transition: left 0.3s ease;
    overflow-y: auto;
    font-family: 'Poppins', sans-serif;
}

.sidebar.active {
    left: 0;
}

.image-options-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom scrollbar */
.image-options-container::-webkit-scrollbar,
.right-sidebar::-webkit-scrollbar {
    width: 6px;
}

.image-options-container::-webkit-scrollbar-track,
.right-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.image-options-container::-webkit-scrollbar-thumb,
.right-sidebar::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.image-options-container::-webkit-scrollbar-thumb:hover,
.right-sidebar::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Image Options */
.image-option {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100px;
    background-color: #f9f9f9;
    margin-bottom: 10px;
    padding: 5px;
    font-family: 'Poppins', sans-serif;
}

.image-option:hover {
    border-color: var(--primary-color);
    transform: scale(1.02);
}

.image-option.active {
    border-color: var(--primary-color);
    background-color: #e8f0fe;
}

.image-preview {
    width: 100%;
    height: 60px;
    object-fit: contain;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.image-name {
    font-size: var(--font-xs);
    text-align: center;
    margin-top: 5px;
    color: #666;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.image-icon {
    font-size: 2rem;
    color: var(--primary-color);
}

/* Category Navigation */
.category-navigation {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    position: relative;
    font-family: 'Poppins', sans-serif;
}

.category-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    flex: 1;
    margin: 0 10px;
}

.category-scroll-container::-webkit-scrollbar {
    display: none;
}

.category-tab {
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 5px 5px 0 0;
    font-size: var(--font-sm);
    font-family: 'Poppins', sans-serif;
    color: #666;
}

.category-tab.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    background-color: #f8f9fa;
}

.category-tab:hover {
    background-color: #f0f0f0;
}

.nav-arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    font-family: 'Poppins', sans-serif;
}

.nav-arrow:hover:not(:disabled) {
    background-color: #e0e0e0;
    transform: scale(1.1);
}

.nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.category-content {
    display: none;
}

.category-content.active {
    display: block;
}

.empty-category {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    font-size: var(--font-sm);
    font-family: 'Poppins', sans-serif;
}

/* Search */
.search-container {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: var(--font-sm);
    outline: none;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2);
}

.search-results {
    padding: 10px 15px;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 5px;
    font-size: var(--font-sm);
    font-family: 'Poppins', sans-serif;
}

.search-result-item:hover {
    background-color: #f0f0f0;
}

.search-result-item.active {
    background-color: #e8f0fe;
}

.search-result-icon {
    margin-right: 10px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
    font-size: var(--font-sm);
    font-family: 'Poppins', sans-serif;
}

.search-mode .category-navigation,
.search-mode .category-content {
    display: none !important;
}

.search-mode .search-results {
    display: block !important;
}

/* Main Content */
.main-content-area {
    padding: 0;
    height: 100vh;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
}

.canvas-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    position: relative;
    height: calc(100vh - var(--header-height) - var(--toolbar-height) - 30px);
    width: calc(100% - 30px);
    margin: 15px;
    margin-top: calc(var(--header-height) + 15px);
    margin-bottom: calc(var(--toolbar-height) + 15px);
}

#drawing-canvas {
    display: block;
    background-color: white;
    cursor: crosshair;
    width: 100% !important;
    height: 100% !important;
    touch-action: none;
    max-width: none !important;
    max-height: none !important;
}

.loading-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: var(--font-base);
    font-family: 'Poppins', sans-serif;
}

/* Right Sidebar */
.right-sidebar {
    background-color: white;
    box-shadow: var(--card-shadow);
    height: calc(100vh - var(--header-height) - var(--toolbar-height));
    position: fixed;
    right: -100%;
    top: var(--header-height);
    width: 280px;
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 15px;
    font-family: 'Poppins', sans-serif;
}

.right-sidebar.active {
    right: 0;
}

/* Tool Sections */
.tool-section {
    margin-bottom: 1.5rem;
}

.tool-section h3 {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    color: #333;
    font-size: var(--font-lg);
    font-family: 'Poppins', sans-serif;
}

.tool-section h3 i {
    margin-right: 8px;
    color: var(--primary-color);
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    border: 2px solid #f0f0f0;
    margin: 0 3px 6px 3px;
}

.color-option:hover {
    transform: scale(1.2);
}

.color-option.active {
    border-color: #333;
    transform: scale(1.1);
}

.tool-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 5px;
    font-size: var(--font-sm);
    font-family: 'Poppins', sans-serif;
}

.tool-option:hover {
    background-color: #f0f0f0;
}

.tool-option.active {
    background-color: #e8f0fe;
    color: var(--primary-color);
}

.tool-option i {
    margin-right: 8px;
    font-size: 1.1rem;
}

/* Brush and Eraser Sizes */
.brush-size-container {
    margin-bottom: 1rem;
}

.brush-size-display {
    font-size: var(--font-sm);
    color: #666;
    margin-bottom: 5px;
    font-family: 'Poppins', sans-serif;
}

.brush-size label {
    font-size: var(--font-sm);
    color: #666;
    margin-bottom: 5px;
    font-family: 'Poppins', sans-serif;
}

.size-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    height: 40px;
}

.size-preview-line {
    background-color: #333;
    border-radius: 2px;
}

.brush-preview-line {
    background-color: var(--primary-color);
}

.eraser-preview-line {
    background-color: #999;
}

/* Color Pickers */
.color-picker-container {
    margin: 15px 0;
}

.color-picker-label {
    font-size: var(--font-sm);
    margin-bottom: 8px;
    display: block;
    color: #666;
    font-family: 'Poppins', sans-serif;
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker-input {
    width: 100%;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
}

.color-picker-value {
    font-size: var(--font-sm);
    font-family: monospace;
    background-color: #f5f5f5;
    padding: 5px 10px;
    border-radius: 4px;
    min-width: 80px;
    text-align: center;
}

/* Dividers */
.horizontal-divider {
    width: 100%;
    height: 1px;
    background-color: #eee;
    margin: 15px 0;
}

.divider {
    height: 1px;
    background-color: #eee;
    margin: 15px 0;
}

/* Tooltip */
.tooltip-info {
    font-size: var(--font-xs);
    color: #666;
    margin-top: 5px;
    font-family: 'Poppins', sans-serif;
}

/* Mobile Toolbar */
.mobile-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 8px 5px;
    height: var(--toolbar-height);
}

.mobile-toolbar .row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    margin: 0;
    flex-wrap: nowrap;
}

.mobile-tool-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    border: none;
    background: transparent;
    border-radius: 6px;
    transition: all 0.3s;
    width: 100%;
    height: 100%;
    font-size: 0.65rem;
    min-height: 50px;
    font-family: 'Poppins', sans-serif;
}

.mobile-tool-btn.active {
    background-color: #e8f0fe;
    color: var(--primary-color);
}

.mobile-tool-btn i {
    font-size: 1rem;
    margin-bottom: 2px;
}

.mobile-tool-btn span {
    font-size: 0.65rem;
    line-height: 1.1;
    text-align: center;
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height) - var(--toolbar-height));
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.mobile-overlay.active {
    display: block;
}

/* Buttons */
.btn {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: var(--font-sm);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #3a5a80;
    border-color: #3a5a80;
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.btn-help {
    background-color: #6c757d;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: var(--font-sm);
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}

.btn-help:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

.btn-proceed {
    background-color: var(--primary-color);
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: var(--font-sm);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
}

.btn-proceed:hover {
    background-color: #3a5a80;
    transform: translateY(-2px);
}

/* Action Buttons */
.action-buttons {
    position: sticky;
    bottom: 0;
    background: white;
    padding: 15px 0;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.action-btn {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    background-color: #f0f0f0;
    transition: all 0.3s;
}

.action-btn:hover:not(:disabled) {
    background-color: #e0e0e0;
    transform: scale(1.1);
}

.action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.action-btn i {
    font-size: 1.2rem;
    color: #555;
}

/* Modals */
.fill-modal,
.color-picker-modal,
.download-options-modal,
.contact-modal,
.help-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    font-family: 'Poppins', sans-serif;
}

.fill-modal-content,
.color-picker-modal-content,
.download-options-modal-content,
.contact-modal-content,
.help-modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    font-family: 'Poppins', sans-serif;
}

.fill-modal-content {
    width: 300px;
}

.color-picker-modal-content {
    width: 320px;
}

.download-options-modal-content {
    width: 400px;
    max-width: 90%;
}

.contact-modal-content {
    width: 400px;
    max-width: 90%;
}

.help-modal-content {
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* Modal specific styles */
.fill-color-preview {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #ddd;
}

.fill-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.color-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.color-picker-title {
    font-size: var(--font-lg);
    font-weight: 600;
    color: #333;
    font-family: 'Poppins', sans-serif;
}

.color-picker-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    font-family: 'Poppins', sans-serif;
}

.color-picker-close:hover {
    color: #333;
}

.color-picker-preview {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    margin: 15px 0;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    font-family: 'Poppins', sans-serif;
}

.color-picker-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.color-picker-inputs input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: var(--font-sm);
}

.color-picker-presets {
    margin-top: 15px;
}

.color-picker-presets-title {
    font-size: var(--font-sm);
    margin-bottom: 8px;
    color: #666;
    font-family: 'Poppins', sans-serif;
}

.color-picker-presets-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.color-preset {
    width: 25px;
    height: 25px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.color-preset:hover {
    transform: scale(1.1);
}

.color-picker-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

/* Download Options */
.download-options-title {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    font-size: var(--font-xl);
    font-family: 'Poppins', sans-serif;
}

.download-options-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.download-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Poppins', sans-serif;
}

.download-option:hover {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}

.download-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 1.2rem;
    color: white;
    background-color: #2196F3;
}

.download-option-text {
    flex: 1;
}

.download-option-text h4 {
    margin-bottom: 5px;
    font-size: var(--font-base);
    font-family: 'Poppins', sans-serif;
}

.download-option-text p {
    margin: 0;
    color: #666;
    font-size: var(--font-sm);
    font-family: 'Poppins', sans-serif;
}

/* Download Icon */
.download-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: all 0.3s;
}

.download-icon:hover {
    background-color: #3a5a80;
    transform: scale(1.1);
}

.download-icon i {
    color: white;
    font-size: 1.5rem;
}

/* Messages */
.success-message,
.warning-message {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3000;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    display: none;
    font-size: var(--font-sm);
    font-family: 'Poppins', sans-serif;
}

.success-message {
    background-color: #4CAF50;
    color: white;
}

.warning-message {
    background-color: #ff9800;
    color: white;
}

/* Contact Styles */
.contact-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: var(--font-sm);
    font-family: 'Poppins', sans-serif;
}

.contact-info:hover {
    background-color: #f0f0f0;
}

.contact-icon {
    margin-right: 8px;
    color: var(--primary-color);
}

.contact-modal-content i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-modal-content h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
}

.contact-modal-content p {
    margin-bottom: 20px;
    line-height: 1.5;
    font-family: 'Poppins', sans-serif;
}

.email-address {
    font-weight: bold;
    color: var(--primary-color);
    font-size: var(--font-base);
    margin: 15px 0;
    padding: 10px;
    background-color: #f0f8ff;
    border-radius: 5px;
    display: inline-block;
    font-family: 'Poppins', sans-serif;
}

/* Help Modal */
.help-step {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-family: 'Poppins', sans-serif;
}

.help-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.help-step h4 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-family: 'Poppins', sans-serif;
}

/* SEO Content */
.seo-content {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Hide desktop columns for mobile-first approach */
.col-md-2,
.col-lg-2,
.col-md-8,
.col-lg-8 {
    display: none !important;
}

.main-content-area {
    display: block !important;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .mobile-toolbar .row {
        justify-content: space-between;
    }

    .mobile-tool-btn {
        padding: 3px 1px;
        font-size: 0.6rem;
    }

    .mobile-tool-btn i {
        font-size: 0.9rem;
    }

    .mobile-tool-btn span {
        font-size: 0.6rem;
    }
}

@media (max-width: 360px) {
    .mobile-tool-btn {
        font-size: 0.55rem;
    }

    .mobile-tool-btn span {
        font-size: 0.55rem;
    }

    .mobile-tool-btn i {
        font-size: 0.85rem;
    }
}

/* Ensure canvas dimensions */
.canvas-dimensions-fixed {
    width: 100% !important;
    height: 100% !important;
}