/* CSS for Settings Page */

.settings-container {
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Grid Utilities */
.grid {
    display: grid;
    gap: 1rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Responsive Overrides (Simulating Tailwind md:) */
@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Mobile Adjustments for Containers */
@media (max-width: 768px) {
    .settings-container {
        padding: 0.25rem;
    }

    .settings-container .wobbly-box {
        /* Remove side margins so cards go to the edges */
        margin-left: 0;
        margin-right: 0;
        width: auto;
    }
}

/* Fix for Sticker Labels overlapping content */
.settings-container .wobbly-box {
    padding-top: 2.5rem; /* Ensure enough space for the absolute header sticker */
}

/* Utility Classes */
.gap-4 {
    gap: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.w-full {
    width: 100%;
}

.bg-white {
    background-color: white;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-start {
    align-items: flex-start;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.text-center {
    text-align: center;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.font-bold {
    font-weight: 700;
}

.tracking-wide {
    letter-spacing: 0.025em;
}

.uppercase {
    text-transform: uppercase;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-t-lg {
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

.rounded-b-lg {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

.overflow-hidden {
    overflow: hidden;
}

.border-2 {
    border-width: 2px;
}

.border-b-0 {
    border-bottom-width: 0;
}

.border-b-2 {
    border-bottom-width: 2px;
}

.border-black {
    border-color: #000;
}

.border-gray-400 {
    border-color: #9ca3af;
}

.border-t-transparent {
    border-top-color: transparent;
}

/* Colors */
.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-black\/50 {
    background-color: rgba(0, 0, 0, 0.5);
}

.bg-yellow-400 {
    background-color: var(--color-yellow);
}

.bg-green-500 {
    background-color: var(--color-green);
}

.bg-red-600 {
    background-color: var(--color-magenta);
}

.bg-green-50 {
    background-color: #f0fdf4;
}

.bg-yellow-50 {
    background-color: #fefce8;
}

.bg-red-50 {
    background-color: #fef2f2;
}

.text-white {
    color: white;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-600 {
    color: #4b5563;
}

.text-red-600 {
    color: var(--color-magenta);
}

.text-yellow-600 {
    color: #d97706; /* Darker yellow for text visibility */
}

/* Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-colors {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.opacity-0 {
    opacity: 0;
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

.hover\:translate-x-\[1px\]:hover {
    transform: translateX(1px);
}

.hover\:translate-y-\[1px\]:hover {
    transform: translateY(1px);
}

/* Shadows */
.shadow-\[4px_4px_0px_0px_rgba\(0\,0\,0\,1\)\] {
    box-shadow: 4px 4px 0px 0px rgba(0,0,0,1);
}

.shadow-\[3px_3px_0px_0px_rgba\(0\,0\,0\,1\)\] {
    box-shadow: 3px 3px 0px 0px rgba(0,0,0,1);
}

.hover\:shadow-\[3px_3px_0px_0px_rgba\(0\,0\,0\,1\)\]:hover {
    box-shadow: 3px 3px 0px 0px rgba(0,0,0,1);
}

/* Custom Components */
.comic-input {
    width: 100%;
    border: 2px solid var(--color-ink);
    padding: 0.5rem;
    font-family: var(--font-body);
    font-size: 1.125rem;
    border-radius: 0.5rem;
}

.object-cover {
    object-fit: cover;
}

.h-\[100px\] {
    height: 100px;
}

.hidden {
    display: none;
}

.cursor-pointer {
    cursor: pointer;
}

.resize-none {
    resize: none;
}

.space-y-3 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.75rem;
}

.space-y-6 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1.5rem;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Comic Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-right: 10px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb; /* Gray-200 */
    transition: .4s;
    border: 2px solid black;
    border-radius: 34px;
    box-shadow: 2px 2px 0px 0px rgba(0,0,0,1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 2px; /* Adjusted for border */
    background-color: white;
    transition: .4s;
    border: 2px solid black;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--color-green);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Hover effect on the slider */
.toggle-switch:hover .slider {
    background-color: #d1d5db; /* Gray-300 */
}

.toggle-switch:hover input:checked + .slider {
    background-color: var(--color-green); /* Keep green on hover if checked */
    filter: brightness(1.1);
}
