/* Slide Generator Styles */

.generator-container {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.generator-header {
    margin-bottom: 2rem;
}

.generator-header .entry-title {
    margin-bottom: 0.5rem;
}

.slide-form .form-group {
    margin-bottom: 1.5rem;
}

.slide-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.slide-form input[type="text"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.slide-form .help-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
}

.radio-group label {
    font-weight: normal;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.style-inputs {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 6px;
    border: 1px solid #eee;
    margin-bottom: 2rem;
}

.style-inputs h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.button.primary {
    background: var(--color-black);
    color: var(--color-white);
}

.button.primary:hover {
    background: var(--color-red);
}

.button.secondary {
    background: #eee;
    color: var(--color-black);
}

.button.secondary:hover {
    background: #ddd;
}

.button.export-btn {
    background: var(--color-white);
    color: var(--color-black);
    border: 1px solid var(--color-light-gray);
    margin-right: 0.5rem;
}

.button.export-btn:hover {
    background: var(--color-red);
    color: var(--color-white);
    border-color: var(--color-red);
}

/* Presentation Layer */
.slide-presentation-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background: var(--color-white);
    
    /* Hidden by default via opacity, inert removes it from DOM access */
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-presentation-layer.is-active {
    opacity: 1;
}

/* Toolbar */
.presentation-toolbar {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    z-index: 100000;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.slide-presentation-layer.is-active:hover .presentation-toolbar {
    opacity: 1;
}

.exit-slide-btn {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.exit-slide-btn:hover {
    background: var(--color-red);
}

/* Presentation Wrapper */
.presentation-wrapper {
    /* This wrapper handles the dynamic visual scaling without affecting the true pixel dimensions inside */
    transform-origin: center center;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.export-container {
    background-color: var(--color-white);
    position: relative;
    overflow: hidden;
    /* Default dimensions, will be overwritten by JS based on aspect ratio */
    width: 1920px;
    height: 1080px;
}

/* Overwrite home.css and interior.css strict positioning for the export container */
.export-container .home-container,
.export-container #slide-interior-top-row {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding-top: 5px;
    padding-left: 5px;
    box-sizing: border-box;
}

.export-container .flowing-content {
    width: 120%;
    height: 120%;
    margin: -5px 0 0 -5px;
}

#slide-interior-top-row {
    font-family: Helvetica, Arial, 'Arimo', sans-serif;
    color: var(--color-white);
    -webkit-text-stroke: 1px var(--color-light-gray);
    letter-spacing: -0.02em;
}

#slide-interior-top-row .text-line {
    white-space: nowrap;
}

#slide-interior-top-row .outline-red {
    color: var(--color-red) !important;
    filter: none !important;
    -webkit-text-stroke: 0px !important;
}

#slide-interior-top-row .outline-black {
    -webkit-text-stroke: 1px var(--color-black) !important;
    color: transparent !important;
    filter: none !important;
}

/* Suppress all transitions and animations inside export container to ensure immediate rendering for html2canvas */
.export-container * {
    transition: none !important;
    animation: none !important;
}

/* Style 1 Custom Phrases */
.menu-item-link {
    color: var(--color-red);
    -webkit-text-stroke: 0px transparent !important;
}

/* Style 1 Phrase Input Color Config Styles */
.phrase-input-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.phrase-input-row .form-group {
    margin-bottom: 0 !important;
}

.phrase-input-row .phrase-field-group {
    flex: 3;
}

.phrase-input-row .phrase-color-group {
    flex: 1.5;
}

.phrase-input-row .phrase-custom-color-group {
    flex: 0 0 60px;
}

.phrase-color-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background-color: #fff;
    box-sizing: border-box;
}

.phrase-color-picker {
    width: 100%;
    height: 45px;
    padding: 2px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .phrase-input-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .phrase-input-row .phrase-custom-color-group {
        flex: none;
        width: 100%;
    }
}

/* Style 1 Graphic */
.export-container .random-graphic {
    height: 1em;
    width: 1em;
    flex-shrink: 0;
    vertical-align: middle;
    display: inline-block;
    padding: 0;
    transform: none;
    position: relative;
    z-index: 1;
}

/* Screen-reader utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.selectors-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1.25rem;
}

.compact-selector-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.compact-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin-bottom: 0.25rem;
    display: block;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Segmented Control Styling */
.segmented-control {
    display: inline-flex;
    background: #f0f0f0;
    padding: 3px;
    border-radius: 8px;
    width: auto;
    border: 1px solid #e2e2e2;
}

.segment-btn {
    cursor: pointer;
    display: block;
    user-select: none;
}

.segment-btn .btn-inner {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: bold;
    color: #555;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.segment-btn .btn-inner .btn-icon {
    color: #888;
    transition: color 0.2s;
}

.segment-btn:hover .btn-inner {
    color: #111;
}

.segment-btn input:checked + .btn-inner {
    background: #ffffff;
    color: var(--color-black);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.segment-btn input:checked + .btn-inner .btn-icon {
    color: var(--color-red);
}

/* Pill Group Styling */
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pill-btn {
    cursor: pointer;
    display: block;
    user-select: none;
}

.pill-btn .btn-inner {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #666;
    background: #fff;
    border: 1px solid #dcdcdc;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pill-btn:hover .btn-inner {
    border-color: #999;
    color: #111;
    background: #fafafa;
}

.pill-btn input:checked + .btn-inner {
    background: var(--color-black);
    color: var(--color-white);
    border-color: var(--color-black);
}

.pill-btn input:checked + .btn-inner .shape-icon {
    border-color: var(--color-white);
    background: var(--color-white);
    opacity: 0.9;
}

.shape-icon {
    display: inline-block;
    border: 1px solid #999;
    border-radius: 1px;
    background: transparent;
    transition: all 0.2s;
    box-sizing: border-box;
}

.pill-btn input:checked + .btn-inner .shape-icon.ratio-card {
    border-color: var(--color-white);
    background: transparent;
}

/* Mini aspect ratios shapes */
.ratio-16-9 {
    width: 12px;
    height: 7px;
}
.ratio-1-1 {
    width: 8px;
    height: 8px;
}
.ratio-4-5 {
    width: 8px;
    height: 10px;
}
.ratio-9-16 {
    width: 7px;
    height: 12px;
}
.ratio-a4-l {
    width: 11px;
    height: 8px;
}
.ratio-a4-p {
    width: 8px;
    height: 11px;
}
.ratio-card {
    width: 12px;
    height: 8px;
    border-style: dashed;
}
