/* Specific styles for the palette generator page */

.harmony-card {
    background-color: #fff;
    padding: 1.5rem; /* 24px */
    border-radius: 1rem; /* 16px */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.harmony-card h3 {
    font-size: 1.25rem; /* 20px */
    line-height: 1.75rem; /* 28px */
    font-weight: 700;
    color: #1f2937; /* text-gray-800 */
    margin-bottom: 1rem; /* 16px */
}

.palette-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* 12px */
}

/* MODIFICATION: Updated grid for detailed swatches */
.palette-container-row {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 0.75rem; /* 12px */
}

@media (min-width: 768px) {
    .palette-container-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.copied-text {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #22c55e; /* bg-green-500 */
    color: #fff; /* text-white */
    font-weight: 700;
    opacity: 0;
    transition: opacity 200ms;
    pointer-events: none;
}

.harmony-swatch {
    display: flex;
    border-radius: 0.5rem; /* 8px */
    overflow: hidden;
    background-color: #f9fafb; /* bg-gray-50 */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s;
}
.harmony-swatch:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.swatch-preview {
    flex-shrink: 0;
    width: 70px;
    position: relative;
    cursor: pointer;
}
.swatch-preview .copy-icon-swatch {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.swatch-preview:hover .copy-icon-swatch {
    opacity: 0.8;
}
.swatch-details {
    padding: 0.5rem 0.75rem; /* 8px 12px */
    flex-grow: 1;
    text-align: left;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
}
.swatch-name {
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: #111827; /* text-gray-900 */
    margin-bottom: 0.25rem;
}
.swatch-value-grid {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 0.1rem 0.5rem;
    color: #4b5563; /* text-gray-600 */
}
.swatch-value-grid > span:first-child {
    font-weight: 500;
    color: #6b7280; /* text-gray-500 */
}

.accessibility-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.accessibility-item:nth-child(odd) {
    background-color: #f9fafb; /* bg-gray-50 */
}

.color-pair {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: monospace;
    font-size: 0.875rem;
    color: #4b5563; /* text-gray-600 */
}

.swatch-small {
    width: 2.5rem;
    height: 1.5rem;
    border-radius: 0.375rem;
    border: 1px solid #d1d5db; /* border-gray-300 */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.contrast-ratio {
    font-weight: bold;
    color: #1f2937; /* text-gray-800 */
}

.pass-fail {
    display: flex;
    gap: 0.5rem;
}

.badge {
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.badge.pass {
    background-color: #d1fae5; /* bg-green-100 */
    color: #065f46; /* text-green-800 */
}

.badge.fail {
    background-color: #fee2e2; /* bg-red-100 */
    color: #991b1b; /* text-red-800 */
}

/* Share Modal Styles */
#share-modal {
    transition: opacity 0.3s ease-in-out, visibility 0.3s;
    opacity: 0;
    visibility: hidden;
}
#share-modal.visible {
    opacity: 1;
    visibility: visible;
}

#share-modal #share-modal-content {
    transform: translateY(-1rem);
    transition-property: all;
    transition-duration: 300ms;
    opacity: 0;
}

#share-modal.visible #share-modal-content {
    opacity: 1;
    transform: translateY(0);
}

.share-link {
    display: block;
    width: 100%;
    text-align: center;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 300ms;
}
.share-link:hover {
    transform: scale(1.05);
}

.share-link.twitter { background-color: #000; color: #fff; }
.share-link.facebook { background-color: #1877f2; color: #fff; }
.share-link.email { background-color: #6b7280; color: #fff; }
.share-link.copy { background-color: #22c55e; color: #fff; }
.share-link.copy:disabled { background-color: #16a34a; cursor: not-allowed; }

/* Color Wheel Legend Styles */
#color-wheel-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1rem; /* 8px 16px */
    font-size: 0.875rem; /* 14px */
    color: #4b5563; /* text-gray-600 */
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.375rem; /* 6px */
}

.legend-item svg {
    width: 16px;
    height: 16px;
}

/* NEW: Lightness Slider Styles */
.control-button {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 9999px;
    background-color: #e5e7eb; /* bg-gray-200 */
    color: #374151; /* text-gray-700 */
    font-size: 1.25rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
}
.control-button:hover {
    background-color: #d1d5db; /* bg-gray-300 */
}
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #d1d5db; /* bg-gray-300 */
    border-radius: 5px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4f46e5; /* bg-indigo-600 */
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #4f46e5; /* bg-indigo-600 */
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}