/* file: /css/storybot-story-style.css */

/* General Story Content Styling */
.full-width-story {
    max-width: 100%;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Font Size Controls */
.story-font-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px 15px;
    margin-bottom: 15px;
}

.font-control-label {
    font-size: 14px;
    color: #9a8da0;
    font-weight: 500;
    margin-right: 5px;
}

.story-font-controls .increase-font-size,
.story-font-controls .decrease-font-size {
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #9a8da0;
    font-size: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.story-font-controls .increase-font-size:hover,
.story-font-controls .decrease-font-size:hover {
    background-color: rgba(172, 214, 143, 0.2);
    color: #acd68f;
    transform: scale(1.05);
    border-color: rgba(172, 214, 143, 0.3);
}

.story-font-controls .increase-font-size:active,
.story-font-controls .decrease-font-size:active {
    transform: scale(0.95);
}

/* Disabled state for font size buttons */
.story-font-controls .increase-font-size.disabled,
.story-font-controls .decrease-font-size.disabled {
    cursor: not-allowed;
    opacity: 0.4 !important;
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: #555 !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.story-font-controls .increase-font-size.disabled:hover,
.story-font-controls .decrease-font-size.disabled:hover {
    transform: none !important;
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: #555 !important;
}

/* Visual feedback for font size changes */
.story-content.font-size-changing,
.story-text.font-size-changing {
    position: relative;
}

.story-content.font-size-changing::before,
.story-text.font-size-changing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(172, 214, 143, 0.1);
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 8px;
    z-index: 1;
}

/* Ensure story content transitions smoothly */
.story-content p,
.story-text p {
    transition: font-size 0.3s ease;
}



/* Custom Styles for Single Stories Page */
.story-content {
    flex: 1; /* Expand to fill available vertical space */
    font-size: 18px; /* Slightly larger font for better readability */
    line-height: 1.6; /* Improved line height for easier reading */
    color: #9a8da0; /* Soft lavender for a gentle, calming effect */
    /* background-color: #2b2b2b; /* Slightly lighter gray for content background */
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.story-content h1, .story-content h3 {
    color: #9a8da0; /* Soft lavender for a gentle, calming effect */
	text-decoration: none;
}

.story-content a {
    color: #9a8da0;
    text-decoration: none; /* Removes underlining from links */
}

.story-content p {
    /* font-family: "Slackside One", cursive; */
    font-size: 20px; /* Slightly larger font for better readability */
}


/* Custom Styles for the Header Se */
.story-header {
    text-align: center; /* Centers the story header */
    margin-bottom: 20px; /* Bottom margin for the story header */
}

.story-title {
    font-size: 3.5em;
    text-align: center;
    margin-bottom: 20px;
    color: #c0c0c0;
}


/* Story Actions Section */
.story-actions {
    display: flex;
    flex-wrap: wrap; /* Allows the icons to wrap if needed */
    justify-content: center;
    gap: 15px; /* Adds space between icons */
    padding: 10px;
    /* background-color: #515151e3; */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); */
    border-radius: 10px;
    margin: 20px auto;
    max-width: 680px; /* Set max width for alignment control */
}

.story-actions i {
    font-size: 1.5em;
    cursor: pointer;
    transition: color 0.3s ease;
}

.story-actions i:hover {
    color: #acd68f;
}

/* Color Classes for Icons Based on Availability */
.audio-exists,
.song-exists {
    color: #acd68f; /* Green for items that are available for free */
}

.audio-credits,
.song-credits {
    color: #fade93; /* Gold color for items that require credits */
}

.no-audio-no-credits,
.no-song-no-credits {
    color: #f3bebe; /* Red color for unavailable items */
}

.story-actions .public {
    color: green;
}

.story-actions .private {
    color: red;
}


/* #share-options {

} */

.share-popover {
    background-color: #f4f4f4; /* Background color for the share popover */
    color: #5C3D2E; /* Font color for the share popover */
    padding: 10px; /* Padding for the share popover */
    border-radius: 10px; /* Rounded corners for the share popover */
    text-align: center; /* Text alignment for the share popover */
    display: none; /* Default display is none for the share popover */
    position: absolute; /* Positioning for the share popover */
    left: 50%; /* Centering the share popover horizontally */
    transform: translateX(-50%); /* Corrects the centering of the share popover */
    margin-top: 10px; /* Top margin for the share popover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Box shadow for the share popover */
    z-index: 1; /* Z-index for the share popover to ensure it's above other elements */
}

.share-popover a {
    display: flex; /* Displays links as flex items for alignment */
    align-items: left; /* Aligns items to the left */
    justify-content: left; /* Justifies content to the left */
    margin-bottom: 5px; /* Bottom margin for links */
    color: #5C3D2E; /* Font color for links */
    text-decoration: none; /* No text decoration for links */
}

.share-popover i {
    margin-right: 8px; /* Right margin for icons */
}

/* Optional: Add hover effect for links */
.share-popover a:hover {
    background-color: #ddd; /* Background color on hover */
    border-radius: 4px; /* Rounded corners on hover */
}



.story-text {
    padding: 20px;
    font-size: 1.1em;
    color: #ddd;
    line-height: 1.8;
    background-color: #3a3a3a;
    border-radius: 0 0 8px 8px; /* Only round bottom corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-top: 0; /* Ensures no gap between image and content */
}

/* Overlays */
#music-overlay,
#tts-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Dark overlay */

    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it overlays all other content */
}

#tts-overlay .interstitial, #music-overlay .interstitial {
/*NEW Content inside overlays */
    border-radius: 40px;
    padding: 20px;
    text-align: center;
}

#tts-video, #music-video {
    max-width: 80%; /* Controls the video size within overlay */
    max-height: 80%;
    margin-top: 20px; /* Adds margin from the top */
    border-radius: 40px; /* Adds rounded corners */
}

/* Close button styling */
.overlay-close-btn {
    position: absolute; /* Position relative to the parent container */
    right: 5px; /* Distance from the right */
    background: none;
    border: none;
    font-size: 1.5rem; /* Adjust size of the X */
    font-weight: bold;
    color: #fff; /* White color for better visibility */
    cursor: pointer;
    z-index: 100; /* Ensure it appears above other elements */
}

.overlay-close-btn:hover {
    color: #4BB543; /* Change to red on hover for emphasis */
    background: none;
}


/* Reviews Section */
.story-reviews-form {
    font-size: 2em;
    display: flex;
    text-align: center;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 15px;
}

.glsr-label {
    margin-bottom: 10px;  /* Space between the label and stars */
}

.glsr-star-rating {
    margin-top: 15px;
    display: flex; /* Flexbox for easy manipulation */
    justify-content: center; /* Center the stars horizontally */

    width: 100%;  /* Ensure stars take up the full width */
}

.glsr-minimal button.glsr-button {
    font-size: 0.5em;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

/* Main CTA Section */
.story-read-more-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-start;
    margin: 20px auto;
    padding: 30px;
    border: 1px solid #717171;
    max-width: 1000px;
    box-sizing: border-box;
    background-color: #202020;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.story-read-more-cta h3{
    line-height: 1em;
}

/* Left and Right Columns */
.story-read-more-left,
.story-read-more-right {
    flex: 1;
    min-width: 300px;
}

.story-read-more-right {
    padding-left: 20px;
    border-left: 1px solid #717171;
}

/* Registration Form */
#registration-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#registration-form .form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

#registration-form label {
    font-size: 14px;
    margin-bottom: 5px;
    color: #b8b8b8;
}

#registration-form input[type="text"],
#registration-form input[type="email"],
#registration-form input[type="password"] {
    padding: 10px;
    border: 1px solid #717171;
    border-radius: 5px;
    font-size: 14px;
    background-color: #2e2e2e;
    color: #ffffff;
    width: 100%;
}

#registration-form input:focus {
    border-color: #5c6bc0;
    outline: none;
}

.registration-submit {
    padding: 10px 20px;
    font-size: 16px;
    font-weight: bold;
    background-color: #5c6bc0;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.registration-submit:hover {
    background-color: #4BB543;
    color: #ffffff;
}


.registration-submit:active {
    transform: scale(0.98);
}

.registration-success-message {
    margin: 20px auto;
    padding: 15px;
    max-width: 600px;
    background-color: #d4edda; /* Light green background */
    border: 1px solid #c3e6cb; /* Green border */
    border-radius: 5px;
    color: #155724; /* Dark green text */
    text-align: center;
    font-size: 16px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Social Login Section */
.story-read-more-social {
    flex-basis: 100%;
    text-align: center;
    margin-top: 20px;
}

.story-read-more-social p {
    font-size: 14px;
    color: #c0c0c0;
    margin: 0em
}

.social-login-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap; /* Allow wrapping for multiple rows */
}

.nsl-button {
    width: 230px; /* Set a maximum width */
    text-align: center;
}

/* Login Benefits */
.story-login-benefits ul {
    margin-top: 2em!important;
    list-style: none;
    padding: 0;
    margin: 0 0 0 1.2em
}

.story-login-benefits li {
    display: flex;
    align-items: center;
    margin: 8px 0;
    padding: 8px;
    color: var(--text-primary, #333);
}

.story-login-benefits .benefit-emoji {
    margin-right: 12px;
    font-size: 18px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}


/* Specific Icons Styling */
.fa-solid {
    font-weight: 900;
}

@media (max-width: 768px) {
    
    .full-width-story {
        padding: 0px;
    }

    .story-title {
        font-size: 2.8em;
    }

    .story-actions {
        max-width: 100%; /* Allow icons to stretch fully within the screen */
        gap: 7px;
        justify-content: center;
    }

    .story-actions i {
      font-size: 24px;
      margin: 6px 6px;
      cursor: pointer;
    }

    .story-read-more-cta {
        flex-direction: column; /* Stack items vertically */
    }

    .story-read-more-left,
    .story-read-more-right {
        min-width: unset;
        border-left: none; /* Remove divider on mobile */
        padding-left: 0; /* Remove padding on mobile */
    }

    .social-login-wrapper .nextend-social-login {
        flex: 1 1 calc(50% - 10px); /* Each button takes 50% of the row width, minus gap */
    }

    .social-login-wrapper .nsl-button {
        flex: 1 1 calc(50% - 10px); /* Each button takes 50% of the row width, minus gap */
    }

    /* SiteReview Block */
    .glsr-field-rating {
        font-size: 0.7em; /* Slightly smaller font size */
    }

    .glsr-label {
        margin-bottom: 15px;
    }

    .glsr-label span {
        font-size: 0.9em; /* Adjust label font size on mobile */
        margin-bottom: 15px;
    }

    .glsr-star-rating--stars {
        margin-top: 15px;
    }

    .glsr-star-rating--stars.s30 {
        font-size: 0.9em; /* Make the stars a bit smaller */
    }

    .glsr-star-rating {
        gap: 2px; /* Reduce spacing between stars */
    }

    .glsr-field-error {
        font-size: 0.8em; /* Make error message font smaller */
    }

    /* Font Size Controls on Mobile */
    .story-font-controls {
        padding: 8px 10px;
        margin-bottom: 10px;
        justify-content: center;
        gap: 8px;
    }

    .font-control-label {
        font-size: 12px;
        margin-right: 8px;
    }

    .story-font-controls .increase-font-size,
    .story-font-controls .decrease-font-size {
        padding: 10px 14px;
        font-size: 18px;
        min-width: 42px;
        text-align: center;
    }

  }

/* Registration Form Styles */
.registration-message {
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 500;
    text-align: center;
}

.registration-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.registration-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Enhanced Registration Form */
.story-read-more-cta {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 40px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.story-read-more-left {
    margin-bottom: 30px;
}

.story-read-more-left h3 {
    color: #4a5568;
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
    font-size: 16px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.registration-submit {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.registration-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.registration-submit:active {
    transform: translateY(0);
}

/* Benefits Section Styling */
.story-read-more-right .story-login-benefits {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    padding: 25px;
    border-left: 5px solid #667eea;
}

.story-login-benefits h3 {
    color: #667eea;
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.story-login-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.story-login-benefits li {
    display: flex;
    align-items: center;
    margin: 12px 0;
    padding: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.story-login-benefits li i {
    color: #48bb78;
    margin-right: 12px;
    font-size: 16px;
    flex-shrink: 0;
}

/* Social Login Section */
.story-read-more-social {
    margin-top: 30px;
    padding: 25px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    text-align: center;
}

.story-read-more-social p {
    margin-bottom: 15px;
    color: #4a5568;
    font-weight: 500;
}

.social-login-wrapper {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .story-read-more-cta {
        padding: 25px 20px;
        margin: 20px 0;
    }
    
    .story-read-more-left h3 {
        font-size: 20px;
    }
    
    .form-group input {
        padding: 12px;
        font-size: 16px;
    }
    
    .registration-submit {
        padding: 15px 25px;
        font-size: 16px;
    }
    
    .story-login-benefits {
        padding: 20px;
    }
}
