/*
Theme Name: PIM Breadcrumbs Child
Theme URI: https://projectimproveme.com/
Description: A custom child theme for the Breadcrumbs emotional support tool.
Author: Kari @ Project: Improve Me
Author URI: https://projectimproveme.com/
Template: bloghash
Version: 1.0
*/

/* --- Breadcrumbs Tool Styles --- */
#breadcrumbs-tool-wrapper {
    font-family: 'Inter', sans-serif; /* Or your preferred font */
    max-width: 700px;
    margin: 2rem auto;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #333;
    line-height: 1.6;
}

h2 {
    color: #4A5568; /* Darker text for headings */
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 700;
}

p {
    margin-bottom: 1rem;
}

/* Hidden utility class (controlled by JavaScript) */
.hidden {
    display: none !important; /* Use !important to ensure override */
}

/* --- Form Styling (Initial Setup Section) --- */
#initial-setup-section .form-group {
    margin-bottom: 1rem;
}

#initial-setup-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2D3748; /* Slightly darker for labels */
}

#initial-setup-section .breadcrumbs-input {
    width: calc(100% - 20px); /* Account for padding */
    padding: 10px;
    border: 1px solid #CBD5E0; /* Light gray border */
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
    transition: border-color 0.2s ease-in-out;
}

#initial-setup-section .breadcrumbs-input:focus {
    border-color: #A0CED9; /* Accent color on focus */
    outline: none;
    box-shadow: 0 0 0 3px rgba(160, 206, 217, 0.3); /* Soft focus ring */
}

/* --- Buttons (Shared Styles) --- */
.tool-button {
    display: block; /* Make them block for full width by default */
    width: 100%; /* Full width in column layout */
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-align: center;
    text-decoration: none; /* For potential links styled as buttons */
    margin-top: 1rem; /* Spacing between buttons */
}

.tool-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

/* Primary buttons (e.g., Save, Feeling buttons) */
.tool-button.primary-button,
.feeling-button,
#save-setup-button,
#get-another-message-button {
    background-color: #cd2d59; /* Your brand primary color */
    color: white;
}

.tool-button.primary-button:hover,
.feeling-button:hover,
#save-setup-button:hover,
#get-another-message-button:hover {
    background-color: #008080; /* Darker shade on hover */
}

/* Secondary buttons (e.g., Back, Change Answers) */
.tool-button.secondary-button,
#change-answers-button,
#back-to-feelings-button,
#tool-message-close {
    background-color: #EDF2F7; /* Light gray */
    color: #4A5568; /* Darker text */
    border: 1px solid #CBD5E0; /* Light border */
}

.tool-button.secondary-button:hover,
#change-answers-button:hover,
#back-to-feelings-button:hover,
#tool-message-close:hover {
    background-color: #E2E8F0; /* Slightly darker gray on hover */
}


/* --- Feeling Selection Section --- */
.feeling-buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Responsive grid */
    gap: 0.75rem; /* Spacing between grid items */
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Adjust feeling button width for grid */
.feeling-buttons-grid .feeling-button {
    width: auto; /* Let grid control width */
    margin-top: 0; /* Remove extra margin */
}


/* --- Feeling Result Section --- */
#feeling-output {
    background-color: #F7FAFC; /* Light background for message box */
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left; /* Keep text left-aligned */
}

#feeling-output p {
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

#feeling-output p:last-child {
    margin-bottom: 0; /* Remove bottom margin from last paragraph */
}

.loading-message {
    font-style: italic;
    color: #6B7280;
    text-align: center;
}

.message-personalized {
    color: #c4275d; /* Accent color for personalized */
    font-weight: 600;
}

.message-universal {
    color: #2D3748; /* Standard text color */
}

.message-nudge {
    color: #4299E1; /* Blue for nudges */
    font-style: italic;
}

/* Layout for buttons below results */
.result-actions {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}
.result-actions .tool-button {
    width: auto; /* Let buttons size based on content */
    flex-grow: 1; /* Allow them to grow and fill space */
    min-width: 180px; /* Minimum width for buttons */
    margin-top: 0; /* Remove default margin-top */
}

/* --- Custom Message Overlay --- */
#tool-message-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent black background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top of everything */
}

.tool-message-box {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    text-align: center;
}

#tool-message-content {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #2D3748;
}

#tool-message-close {
    width: auto; /* Override tool-button default width */
    padding: 0.75rem 1.25rem;
    margin-top: 1rem;
    display: inline-block; /* Allow it to be centered with text-align */
}

/* --- Responsive Adjustments --- */
@media (max-width: 600px) {
    #breadcrumbs-tool-wrapper {
        margin: 1rem auto;
        padding: 1rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    .feeling-buttons-grid {
        grid-template-columns: 1fr; /* Stack buttons on very small screens */
    }
    .tool-button {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    #feeling-output p {
        font-size: 1rem;
    }
    .result-actions {
        flex-direction: column; /* Stack result buttons */
        align-items: center;
    }
}