/* Pull in common stylesheet */
@import url("common.css");


.hero-text {
    font-family: var(--font-hero);
}

.hero-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 20px 0px;
    margin-bottom: 20px;
    min-height: 500px;
}

.hero-content {
    flex: 1;
    max-width: 550px;
}

.hero-title {
    font-family: var(--font-hero);
    font-size: 4.1rem;
    line-height: 1.1;
    color: var(--color-brand-primary);
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--color-neutral-700);
    margin-bottom: 24px;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.hero-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.hero-image {
    width: 100%;
    height: 600px;
    background-image: url('../assets/images/hero-graphic.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--color-brand-primary);
    color: var(--color-text-white) !important;
    border: 2px solid var(--color-brand-primary);
}

.btn-primary:hover {
    background-color: var(--color-brand-primary-dark);
    border-color: var(--color-brand-primary-dark);
    color: var(--color-text-white);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-brand-secondary) !important;
    border: 2px solid var(--color-brand-secondary);
}

.btn-secondary:hover {
    background-color: var(--color-brand-secondary);
    color: var(--color-text-white) !important;
}



/* Selector Section */
#color-palettes {
    scroll-margin-top: 120px;
}

.selector-section {
    margin-top: 40px;
    margin-bottom: 40px;
    scroll-margin-top: 120px;
}

.selector-wrapper {
    background: var(--color-background-white);
    padding: 20px 30px 30px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.selector-wrapper label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text-default-primary);
}

.palette-dropdown {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid var(--color-border-default);
    border-radius: 8px;
    background-color: var(--color-background-white);
    cursor: pointer;
    transition: all 0.2s ease;
}

.palette-dropdown:hover {
    border-color: var(--color-primary-default);
}

.palette-dropdown:focus {
    outline: none;
    border-color: var(--color-primary-default);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Palette Display */
.palette-display {
    background: var(--color-neutral-50);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    scroll-margin-top: 120px;
}

.palette-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* margin-bottom: 30px; */
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.palette-title-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.palette-name-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.palette-header h2 {
    font-size: 2rem;
    color: var(--color-text-default-primary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.palette-header h2:hover {
    color: var(--color-primary-default);
}

.share-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--color-text-default-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
}

.share-btn:hover {
    color: var(--color-primary-default);
    background-color: var(--color-background-neutral-light);
}

.share-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-text-default-primary);
    color: var(--color-background-white);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: 'Monaco', 'Courier New', monospace;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    margin-bottom: 8px;
}

.share-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -4px;
    border-width: 4px;
    border-style: solid;
    border-color: var(--color-text-default-primary) transparent transparent transparent;
}

.share-btn:hover .share-tooltip,
.share-tooltip.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.palette-contributor {
    display: inline-block;
    font-size: .6rem;
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--color-background-neutral-light);
    border-radius: 20px;
    background: var(--color-background-neutral-light);
}

.contributor-name {
    font-size: 0.7rem;
    font-weight: 600;
}

.palette-description {
    color: var(--color-text-default-secondary);
    font-size: 1rem;
    max-width: 100%;
    margin-bottom: 30px;
    line-height: 1.6;
}

.export-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.export-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: var(--color-primary-default);
    color: var(--color-background-white);
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.export-btn:hover {
    background-color: var(--color-brand-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.export-btn:active {
    transform: translateY(0);
}

/* Color Swatches */
.color-swatches {

    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hue-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hue-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-default-primary);
    text-transform: capitalize;
}

.swatches-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 180px));
    gap: 12px;
}

.swatch {
    display: flex;
    flex-direction: column;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    cursor: pointer;
    max-width: 180px;
}

.swatch:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.swatch-color {
    height: 80px;
    width: 100%;
}

.swatch-color.light-swatch {
    border: 1px solid var(--color-border-default);
    border-bottom: none;
    box-sizing: border-box;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.swatch-info {
    padding: 10px;
    background-color: var(--color-background-white);
    border: 1px solid var(--color-border-default);
    border-top: none;
}

.swatch-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-default-primary);
    margin-bottom: 4px;
}

.swatch-hex {
    font-size: 0.85rem;
    color: var(--color-text-default-secondary);
    font-family: 'Monaco', 'Courier New', monospace;
}

/* Palette Gallery */
.palette-gallery {
    margin-top: 60px;
}

.palette-gallery h2 {
    font-size: 1.8rem;
    padding-bottom: 1.5rem;
    color: var(--color-brand-primary);
}

.palette-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.palette-card {
    background: var(--color-background-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
}

.palette-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.palette-card-colors {
    display: flex;
    height: 120px;
}

.palette-card-color {
    flex: 1;
}

.palette-card-info {
    padding: 20px;
}

.palette-card-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-default-primary);
}

.palette-card-description {
    font-size: 0.9rem;
    color: var(--color-text-default-secondary);
    line-height: 1.5;
}

.palette-card-meta {
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--color-text-default-secondary);
}

/* Tabs */
.palette-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-border-default);
    padding-bottom: 0;
}

.palette-tab {
    background: none;
    border: none;
    padding: 10px 16px;
    font-size: 1rem;
    font-family: var(--font-default-body);
    font-weight: 600;
    color: var(--color-text-default-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.palette-tab:hover {
    color: var(--color-primary-default);
}

.palette-tab.active {
    color: var(--color-text-white);
    background-color: var(--color-primary-default);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    border-bottom-color: var(--color-primary-default);
}

/* CSS Code View */
.css-code-view {
    position: relative;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border-default);
}

.css-code-view pre {
    margin: 0;
    padding: 24px;
    overflow-x: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text-default-primary);
}

/* Reset global code styles for the block view */
.css-code-view code {
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: inherit;
    margin: 0;
    display: block;
    /* Ensure it behaves like a block for Prism if needed */
}

.code-actions {
    position: absolute;
    top: 12px;
    right: 12px;
}

.copy-code-btn {
    background-color: var(--color-background-white);
    border: 1px solid var(--color-border-default);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-default-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.copy-code-btn:hover {
    background-color: var(--color-background-neutral-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Responsive Design */

/* Tablet / Small Desktop (max-width: 968px) */
@media (max-width: 968px) {

    /* Hero adjustments */
    .hero-wrapper {
        flex-direction: column-reverse;
        text-align: center;
        padding: 10px;
        margin-bottom: 4em;
        gap: 30px;
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        z-index: 10;
    }

    .hero-image-wrapper {
        justify-content: center;
        width: 100%;
    }

    .hero-image {
        position: relative;
        z-index: 5;
        margin-bottom: -20px;
        height: 300px;
        width: 60%;
        background-size: cover;
        transition: opacity 0.1s ease;
        will-change: opacity;
        mask-image: linear-gradient(to bottom,
                transparent 0%,
                black 5%,
                black 95%,
                transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom,
                transparent 0%,
                black 5%,
                black 95%,
                transparent 100%);
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .btn-secondary:active {
        color: var(--color-brand-secondary);
        background-color: var(--color-background-white);
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .hero-wrapper {
        padding: 0px;
        margin-bottom: 3.5em;
    }

    .hero-image {
        height: 250px;
        width: 60%;
        background-size: cover;
        transition: all 1s ease;
    }

    #color-palettes {
        scroll-margin-top: 90px;
    }

    .palette-gallery h2 {
        font-size: 1.5rem;
    }

    .palette-header {
        flex-direction: column;
    }

    .export-buttons {
        width: 100%;
    }

    .export-btn {
        flex: 1;
        justify-content: center;
    }

    .swatches-container {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .palette-cards {
        grid-template-columns: 1fr;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .hero-wrapper {
        padding: 10px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .hero-image {
        height: 200px;
        width: 80%;
        background-size: cover;
        margin-bottom: -20px;
    }
}