/* components.css */
/* Reusable Component Styles (buttons, cards, forms, and general UI elements) */

/* --- Universal Box-Sizing --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

/* --- Global Container for Centering Content --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Default horizontal padding */
}

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 20px;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.5rem; } /* Added for general use */
h5 { font-size: 1.2rem; } /* Added for general use */
h6 { font-size: 1rem; } /* Added for general use */


/* --- Paragraphs & Descriptions --- */
p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.section-description {
    font-size: 1.2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px; /* Centered with bottom margin */
}

/* --- Buttons (Call-to-Action - CTAs) --- */
.cta-button {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    display: inline-block; /* Allows side-by-side or block display as needed */
    font-weight: 500;
    text-align: center; /* Ensure text is centered within the button */
}

/* Focus styles for accessibility (keyboard navigation) */
.cta-button:focus,
a:focus, /* General link focus */
input:focus,
textarea:focus,
select:focus { 
    outline: 3px solid var(--accent-color); /* Redish-Gold outline for focus */
    outline-offset: 2px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: var(--text-color-on-dark); /* Light text on primary background */
}

.primary-btn:hover {
    background-color: #000066; /* Darker shade of navy */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.secondary-btn {
    background-color: var(--secondary-color); /* Goldenrod */
    color: var(--text-color-on-light); /* Dark text on goldenrod for contrast */
}

.secondary-btn:hover {
    background-color: #B8860B; /* Darker shade of goldenrod */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.accent-btn { /* For specific accent-colored buttons/elements */
    background-color: var(--accent-color); /* Redish-Gold */
    color: var(--text-color-on-light); /* Dark text on bright accent */
}

.accent-btn:hover {
    background-color: #B26B00; /* Darker shade of redish-gold */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.large-btn {
    padding: 16px 35px;
    font-size: 1.2rem;
}

/* --- Backgrounds and Text Colors based on Section Type --- */
/* These assume color variables are defined in :root somewhere higher up (e.g., style.css) */
.light-bg {
    background-color: var(--neutral-light); /* Fixed light gray */
    color: var(--text-color-on-light); /* Default dark text for light backgrounds */
}
.light-bg p, .light-bg strong, .light-bg span, .light-bg .link-separator, .light-bg a:not(.cta-button) {
    color: var(--text-color-on-light);
}
/* Ensure headings on light backgrounds are the primary color (dark blue) or explicitly black */
.light-bg h1, .light-bg h2, .light-bg h3, .light-bg h4, .light-bg h5, .light-bg h6 {
    color: var(--primary-color); 
}
.light-bg .contact-details p i, .light-bg .contact-detail-card i {
    color: var(--primary-color); /* Icons in contact section (light-bg) */
}


.dark-bg {
    background-color: var(--neutral-dark); /* Fixed dark gray */
    color: var(--text-color-on-dark); /* Light text for dark backgrounds */
}

/* All headers on dark backgrounds are now accent color */
.dark-bg h1, .dark-bg h2, .dark-bg h3, .dark-bg h4, .dark-bg h5, .dark-bg h6 {
    color: var(--accent-color); 
}

/* Ensure other text on dark backgrounds is light */
.dark-bg p, .dark-bg strong, .dark-bg span, .dark-bg .link-separator, .dark-bg a:not(.cta-button) { 
    color: var(--text-color-on-dark); 
}


/* --- Card Base Styles (for features, benefits, testimonials, pricing, contact, roles) --- */
.feature-card,
.benefit-card,
.testimonial-card,
.faq-item,
.pricing-card,
.contact-detail-card,
.role-card, /* Added for role selection */
.dashboard-card /* Added for general dashboard cards */
{
    background-color: var(--neutral-light); /* Fixed background for cards by default */
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: var(--text-color-on-light); /* Dark text on light cards */
}

/* Cards that are on dark backgrounds will override this via specific dashboard CSS */
.dashboard-card {
    background-color: var(--primary-color); /* Override for dashboard cards to be dark */
    color: var(--text-color-on-dark); /* Light text on dashboard cards */
}
.dashboard-card h3 {
    color: var(--text-color-on-dark); /* Light text for card titles */
}
.dashboard-card h3 i {
    color: var(--accent-color); /* Redish-gold icons in card titles */
}
.dashboard-card .card-content {
    color: var(--accent-color); /* Redish-gold for key numbers/values */
}
.dashboard-card .card-description {
    color: rgba(229, 231, 235, 0.7); /* Slightly dimmed description */
}


/* Hover effect for all cards */
.feature-card:hover,
.benefit-card:hover,
.testimonial-card:hover,
.pricing-card:hover,
.contact-detail-card:hover,
.role-card:hover,
.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Icons within cards (general styling) */
.feature-card i,
.benefit-card i,
.contact-detail-card i,
.role-card i {
    font-size: 2.5rem; /* Default size for icons in cards */
    margin-bottom: 20px;
    color: var(--accent-color); /* Redish-Gold icons */
}
.role-card i { /* Slightly larger for role cards */
    font-size: 3.5rem;
    color: var(--primary-color); /* Dark blue for icons on light role card */
    transition: color 0.3s ease;
}
.role-card:hover i {
    color: var(--accent-color); /* Redish-Gold on hover */
}


/* Headings within cards */
.feature-card h3,
.benefit-card h3,
.pricing-card h3,
.contact-detail-card h3,
.role-card h3 {
    margin-bottom: 15px;
    font-size: 1.6rem;
    color: var(--primary-color); /* Primary color headings on light cards */
}

/* Paragraphs within cards */
.feature-card p,
.benefit-card p,
.pricing-card p,
.contact-detail-card p,
.role-card p {
    color: var(--text-color-on-light); /* Dark text on light cards */
}

/* --- Form Elements --- */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"], /* Added for date inputs */
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255,255,255,0.2); /* Light border on dark background for auth/dashboard forms */
    border-radius: 8px;
    background-color: rgba(255,255,255,0.05); /* Slightly transparent background */
    color: var(--text-color-on-dark); /* White input text */
    font-size: 1rem;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus, /* Added for date inputs */
input[type="file"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-color); /* Redish-Gold border on focus */
    background-color: rgba(255,255,255,0.1); /* Slightly more opaque background on focus */
}

input::placeholder,
textarea::placeholder {
    color: rgba(229, 231, 235, 0.6); /* Lighter placeholder text */
}

/* Checkbox specific styling */
input[type="checkbox"] {
    width: auto; /* Override 100% width */
    margin-right: 10px;
}

.form-group label[for="terms"] { /* For the "I agree to terms" checkbox */
    display: inline-block;
    margin-bottom: 0;
    font-weight: 400;
}
.form-group label[for="terms"] a {
    color: var(--accent-color); /* Redish-Gold link for terms/privacy */
    text-decoration: underline;
}
.form-group label[for="terms"] a:hover {
    color: var(--secondary-color);
}

/* Horizontal rule for form dividers */
hr.form-divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.4), rgba(255,255,255,0));
    margin: 30px 0; /* Adjust vertical spacing */
}

/* Form help text */
p.form-help-text {
    font-size: 0.9em;
    color: rgba(229, 231, 235, 0.7); /* Lighter text for subtle hints */
    margin-top: 5px;
    margin-bottom: 0;
}

/* Password Strength Indicator */
.password-strength-indicator {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    color: var(--text-color-on-dark); /* Default text color */
}
.password-strength-indicator #strength-text {
    min-width: 60px; /* To prevent text jump */
    text-align: right;
    font-weight: 500;
}
.strength-bar {
    flex-grow: 1;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
}
.strength-progress {
    height: 100%;
    width: 0%;
    background-color: transparent; /* Will be set by JS */
    border-radius: 4px;
    transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
}


/* --- Walkthrough/Onboarding Specific Components --- */
.walkthrough-card {
    background-color: var(--background-color); /* Dark blue background for walkthrough steps */
    color: var(--text-color-on-dark);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 700px;
    margin: 40px auto;
}

.walkthrough-card h3 {
    color: var(--accent-color); /* Redish-Gold for walkthrough headings */
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.walkthrough-card p {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.walkthrough-step-visual {
    width: 100%;
    max-width: 400px; /* Simulate mobile screen width */
    height: 250px; /* Aspect ratio */
    background-color: rgba(255,255,255,0.1); /* Placeholder for screenshot */
    border-radius: 8px;
    margin: 20px auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: rgba(229, 231, 235, 0.7);
    overflow: hidden;
}
.walkthrough-step-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.walkthrough-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allow buttons to wrap on small screens */
}

.walkthrough-dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(229, 231, 235, 0.3);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.3s ease;
}
.walkthrough-dot.active {
    background-color: var(--accent-color); /* Redish-Gold for active dot */
}

/* Client Search Provider Section */
.search-provider-section {
    background-color: var(--background-color); /* Dark background for search area */
    color: var(--text-color-on-dark);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    margin-top: 40px;
    text-align: left;
}
.search-provider-section h3 {
    color: var(--accent-color); /* Redish-Gold heading */
    margin-bottom: 20px;
    text-align: center;
}

.search-results {
    background-color: rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}
.search-results p {
    margin-bottom: 10px;
    font-size: 1rem;
}
.search-results .result-item {
    background-color: rgba(255,255,255,0.1);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.search-results .result-item:last-child {
    margin-bottom: 0;
}
.search-results .result-item button {
    padding: 8px 15px;
    font-size: 0.9rem;
    background-color: var(--secondary-color);
    color: var(--text-color-on-light);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.search-results .result-item button:hover {
    background-color: #B8860B; /* Darker goldenrod */
}


.walkthrough-info {
    background-color: var(--background-color); /* Dark blue background */
    color: var(--text-color-on-dark);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    text-align: center;
    max-width: 700px;
    margin: 40px auto;
}
.walkthrough-info h3 {
    color: var(--accent-color);
    margin-bottom: 20px;
}
.walkthrough-info p {
    margin-bottom: 20px;
}
.walkthrough-info ul {
    list-style: none;
    padding: 0;
    text-align: left;
    margin-bottom: 30px;
}
.walkthrough-info ul li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: var(--text-color-on-dark);
}
.walkthrough-info ul li i {
    margin-right: 15px;
    color: var(--accent-color); /* Redish-gold icons */
}

/* --- Dashboard Specific Components (Common to all dashboards) --- */

.dashboard-table-container {
    overflow-x: auto; /* Enable horizontal scrolling for tables on small screens */
    -webkit-overflow-scrolling: touch;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-color-on-dark);
    min-width: 600px; /* Ensure table is wide enough for content */
}

.dashboard-table th,
.dashboard-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dashboard-table th {
    background-color: rgba(0,0,0,0.2); /* Slightly darker header */
    font-weight: 600;
    color: var(--accent-color); /* Redish-gold for table headers */
    text-transform: uppercase;
    font-size: 0.9rem;
}

.dashboard-table tbody tr:hover {
    background-color: rgba(255,255,255,0.05);
}

/* Status indicators */
.status-active, .status-completed, .status-resolved {
    color: #28a745; /* Green */
    font-weight: 500;
}
.status-pending, .status-in-progress {
    color: #ffc107; /* Yellow */
    font-weight: 500;
}
.status-urgent, .status-high {
    color: #dc3545; /* Red */
    font-weight: 500;
}
.status-low {
    color: #17a2b8; /* Cyan */
    font-weight: 500;
}
.status-on-site {
    color: #007bff; /* Blue */
    font-weight: 500;
}
.status-off-duty {
    color: rgba(229, 231, 235, 0.7); /* Gray */
    font-weight: 500;
}


/* --- Utility Classes --- */
.text-center {
    text-align: center;
}

.mt-40 {
    margin-top: 40px;
}
.mb-3 {
    margin-bottom: 1rem;
}
.my-8 {
    margin-top: 2rem;
    margin-bottom: 2rem;
}


/* --- Responsive Adjustments for Components --- */
@media (max-width: 768px) {
    .container {
        padding: 0 15px; /* Reduce container padding on smaller screens */
    }
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }
    p { font-size: 1rem; }
    .section-description { font-size: 1rem; margin-bottom: 30px; }
    .cta-button { padding: 10px 20px; font-size: 0.95rem; }
    .large-btn { padding: 12px 25px; font-size: 1.1rem; }

    .feature-card, .benefit-card, .testimonial-card, .faq-item, .pricing-card, .contact-detail-card, .role-card, .dashboard-card {
        padding: 20px;
        min-height: auto; /* Allow height to adjust on mobile */
    }
    .feature-card i, .benefit-card i, .contact-detail-card i {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    .role-card i {
        font-size: 3rem;
    }
    .feature-card h3, .benefit-card h3, .pricing-card h3, .contact-detail-card h3, .role-card h3 {
        font-size: 1.3rem;
    }
    .feature-card p, .benefit-card p, .pricing-card p, .contact-detail-card p, .role-card p {
        font-size: 0.95rem;
    }

    /* Forms */
    .contact-form {
        padding: 30px 20px;
    }
    .password-strength-indicator {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .password-strength-indicator #strength-text {
        text-align: left;
        min-width: auto;
    }

    /* Walkthroughs */
    .walkthrough-card {
        padding: 25px 20px;
    }
    .walkthrough-card h3 {
        font-size: 1.6rem;
    }
    .walkthrough-buttons {
        flex-direction: column; /* Stack buttons vertically */
    }

    /* Client Search */
    .search-provider-section {
        padding: 25px 20px;
    }
    .search-provider-section h3 {
        font-size: 1.4rem;
    }
    .search-results .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .search-results .result-item button {
        width: 100%;
    }
    .walkthrough-info {
        padding: 25px 20px;
    }
    .walkthrough-info h3 {
        font-size: 1.4rem;
    }
    .walkthrough-info ul li {
        font-size: 1rem;
    }
}

    
