/* styles.css */

/* Root variables for light/dark mode */
:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --accent-color: #007bff;
    --accent-hover: #0069d9;
    --sidebar-bg: #f8f9fa;
    --preview-bg: #ffffff;
    --border-color: #ddd;
}

.dark {
    --bg-color: #121212;
    --text-color: #ffffff;
    --accent-color: #0d6efd;
    --accent-hover: #0b5ed7;
    --sidebar-bg: #1e1e1e;
    --preview-bg: #2c2c2c;
    --border-color: #444;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

h1 {
    font-size: 1.5rem;
}

.header-controls {
    display: flex;
    gap: 1rem;
}

/* Main container - mobile-first */
.container {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    padding: 1rem;
}

.sidebar {
    background-color: var(--sidebar-bg);
    padding: 1rem;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
}

.preview {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--preview-bg);
    padding: 1rem;
    border: 1px solid var(--border-color);
    margin: 1rem 0;
}

#logo-canvas {
    background-color: transparent;
    border: 1px dashed var(--border-color);
    transition: width 0.3s, height 0.3s;
}

#logo-canvas .selected {
    stroke: red;
    stroke-width: 1px;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Tool sections */
.tool-section {
    margin-bottom: 1rem;
}

h2 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

input, select, button {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

button {
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: var(--accent-hover);
}

#icon-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
}

.icon-item {
    width: 50px;
    height: 50px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    padding: 0.25rem;
    transition: transform 0.2s;
}

.icon-item:hover {
    transform: scale(1.1);
}

#layers-list {
    list-style: none;
}

.layer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.layer-controls button {
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

/* Social share */
.social-share button {
    background-color: #1da1f2; /* Twitter blue */
    margin-right: 0.5rem;
}

#share-facebook {
    background-color: #1877f2; /* Facebook blue */
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Media queries for tablet/desktop */
@media (min-width: 768px) {
    .container {
        flex-direction: row;
    }

    .sidebar {
        width: 250px;
        border-right: 1px solid var(--border-color);
        border-bottom: none;
    }

    .preview {
        margin: 0;
    }

    .controls {
        flex-direction: column;
        width: 250px;
        border-left: 1px solid var(--border-color);
        padding-left: 1rem;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* Accessibility enhancements */
button, input, select {
    font-size: 1rem;
}

[aria-label] {
    cursor: pointer;
}

/* Animations */
button {
    transition: transform 0.1s ease-in-out;
}

button:active {
    transform: scale(0.98);
}