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

/* Form Container & General Layout */
.storybot-form-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.storybot-form-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

.story-form-content-group {
    grid-column: span 12;
    margin-bottom: 15px;
}

.full-width {
    grid-column: span 12;
}

.half-width {
    grid-column: span 6;
}

.third-width {
    grid-column: span 4;
}

/* Form Styling */
#storybot-form {
    font-size: 0.9em;
    background-color: #3a3a3a;
    color: #9d938e;
    border-radius: 10px;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
    padding: 30px;
    box-sizing: border-box;
    overflow: auto;
}

#storybot-form input[type=text],
#storybot-form textarea,
#storybot-form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #4b4a46;
    border-radius: 6px;
    font-size: 16px;
    background-color: #2a2925;
    color: #e0e0e0;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#storybot-form input[type=text]:focus,
#storybot-form textarea:focus,
#storybot-form select:focus {
    border-color: #5c6bc0;
    outline: none;
    box-shadow: 0 0 0 2px rgba(92, 107, 192, 0.2);
}

#storybot-form textarea {
    resize: vertical;
    line-height: 1.4;
    min-height: 100px;
}

#storybot-form select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239d938e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    cursor: pointer;
    padding-right: 35px;
}

#storybot-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #b5afa9;
}

/* Submit Button */
.submit-container {
    margin-top: 10px;
    text-align: center;
}

#generate-story-submit {
    background-color: #5c6bc0;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    width: auto;
    min-width: 250px;
}

#generate-story-submit:hover {
    background-color: #4a59b2;
}

#generate-story-submit:active {
    background-color: #3f4ea0;
    transform: translateY(1px);
}

#generate-story-submit i {
    margin-left: 8px;
}

/* GENDER Slider Styles */
.gender-selection-container {
    width: 100%;
    margin-bottom: 15px;
}

.gender-selection-slider {
    width: 90%;
    margin: 0 auto;
}

.gender-selection-slider input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    margin: 15px 0;
}

/* For Webkit browsers like Chrome, Safari */
.gender-selection-slider input[type=range]::-webkit-slider-runnable-track {
    background: #4b4a46;
    border-radius: 5px;
    height: 8px;
}

/* For Firefox */
.gender-selection-slider input[type=range]::-moz-range-track {
    background: #4b4a46;
    border-radius: 5px;
    height: 8px;
}

/* For IE */
.gender-selection-slider input[type=range]::-ms-track {
    background: #4b4a46;
    border-radius: 5px;
    height: 8px;
    border-color: transparent;
    color: transparent;
}

/* Slider thumb - enhancing the appearance */
.gender-selection-slider input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #5c6bc0;
    margin-top: -8px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.gender-selection-slider input[type=range]::-moz-range-thumb {
    border: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #5c6bc0;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.gender-selection-slider input[type=range]::-ms-thumb {
    border: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #5c6bc0;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Labels container */
.gender-icons {
    display: flex;
    justify-content: space-between;
    text-align: center;
    margin-top: 8px;
}

/* Individual labels */
.gender-icons span {
    flex: 1;
    width: 100%;
    text-align: center;
    font-size: 14px;
    color: #b5afa9;
}

/* Aligning the labels directly under the slider's endpoints */
.gender-icons span:first-child {
    text-align: left;
}

.gender-icons span:last-child {
    text-align: right;
}

/* Morale Styles */
.moral-proposals-container {
    margin-top: 10px;
    z-index: 1000;
}

#moral-tags-container {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#moral-type-title {
    font-weight: bold;
    cursor: pointer;
}

.moral-type-tag, .moral-tag {
    display: inline-block;
    background-color: rgba(92, 107, 192, 0.5);
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: #e0e0e0;
    transition: background-color 0.2s;
}

.moral-type-tag:hover, .moral-tag:hover {
    background-color: #5c6bc0;
}

#next-moral-type {
    margin-top: 10px;
    background-color: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
}

#next-moral-type:hover {
    background-color: #006ba1;
}

/* Tool Tip Section */
.story-efficiency-tools {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.efficiency-tool {
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 1.4;
    color: #f1f1f1;
    gap: 10px;
    flex: 1;
    min-width: 250px;
    padding: 12px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s;
}

.drawing-input {
    border: 1px dashed #797979;
}

.drawing-input:hover {
    border-color: #5c6bc0;
    background-color: rgba(92, 107, 192, 0.2);
    cursor: pointer;
}

.voice-input:hover {
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.tool-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #95a0e1;
    font-size: 20px;
    background-color: rgba(92, 107, 192, 0.1);
    border-radius: 50%;
    flex-shrink: 0;
}

.tool-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.tool-title {
    font-weight: 500;
    color: #f1f1f1;
    margin-bottom: 4px;
    display: block;
}

.tool-tip {
    font-size: 12px;
    color: #bbb;
    line-height: 1.4;
    display: block;
}

/* Input File (Hidden) */
input[type="file"] {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .storybot-form-container {
        padding: 10px;
    }
    
    #storybot-form {
        padding: 15px;
        border-radius: 8px;
    }
    
    .storybot-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .half-width, .third-width {
        grid-column: span 12;
    }
    
    .story-efficiency-tools {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 5px;
    }
    
    .efficiency-tool {
        padding: 8px;
        min-width: 0;
        flex: 1 1 100%;
    }
    
    .tool-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .tool-title {
        font-size: 13px;
    }
    
    .tool-tip {
        font-size: 11px;
        line-height: 1.3;
    }
    
    #generate-story-submit {
        width: 100%;
        padding: 12px;
    }
}
