
/*tool code */

/* --- Age Calculator Tool Styles --- */

:root {
    --ac-primary-color: #007bff;
    --ac-secondary-color: #6c757d;
    --ac-success-color: #28a745;
    --ac-danger-color: #dc3545;
    --ac-light-color: #f8f9fa;
    --ac-dark-color: #343a40;
    --ac-text-color: #212529;
    --ac-bg-color: #ffffff;
    --ac-border-color: #dee2e6;
    --ac-border-radius: 8px;
    --ac-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --ac-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}



.ac-title {
    color: var(--ac-dark-color);
    text-align: center;
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 600;
}

.ac-subtitle {
    text-align: center;
    color: var(--ac-secondary-color);
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.ac-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.ac-fieldset {
    border: 1px solid var(--ac-border-color);
    border-radius: var(--ac-border-radius);
    padding: 1rem 1.5rem 1.5rem;
}

.ac-fieldset legend {
    font-weight: 600;
    color: var(--ac-primary-color);
    padding: 0 0.5rem;
}

.ac-input-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 576px) {
    .ac-input-group {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ac-input-wrapper {
    display: flex;
    flex-direction: column;
}

.ac-input-wrapper label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--ac-secondary-color);
    font-weight: 500;
}

.ac-input-wrapper input {
    padding: 0.75rem;
    border: 1px solid var(--ac-border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ac-input-wrapper input:focus {
    outline: none;
    border-color: var(--ac-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.ac-tooltip {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: var(--ac-secondary-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 12px;
    line-height: 16px;
    cursor: help;
    position: relative;
}

.ac-tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--ac-dark-color);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    width: 220px;
    text-align: left;
    white-space: normal;
    z-index: 10;
    opacity: 1;
    visibility: visible;
}

.ac-button-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.ac-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.ac-button:active {
    transform: translateY(1px);
}

.ac-button-primary {
    background-color: var(--ac-primary-color);
    color: white;
}

.ac-button-primary:hover {
    background-color: #0069d9;
}

.ac-button[type="reset"] {
    background-color: var(--ac-light-color);
    color: var(--ac-secondary-color);
    border: 1px solid var(--ac-border-color);
}

.ac-button[type="reset"]:hover {
    background-color: #e2e6ea;
}

.ac-error-message {
    color: var(--ac-danger-color);
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
    display: none; /* Hidden by default */
}

.ac-results-container {
    margin-top: 2.5rem;
    display: none; /* Hidden by default */
    flex-direction: column;
    gap: 1.5rem;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ac-summary-card {
    background: linear-gradient(135deg, var(--ac-primary-color), #0056b3);
    color: white;
    padding: 1.5rem;
    border-radius: var(--ac-border-radius);
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.ac-summary-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 500;
}

.ac-summary-card .age-string {
    font-size: 2rem;
    font-weight: 700;
}

.ac-summary-card .age-string span {
    font-weight: 400;
    font-size: 1.5rem;
}

.ac-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .ac-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ac-card {
    background-color: var(--ac-bg-color);
    border: 1px solid var(--ac-border-color);
    border-radius: var(--ac-border-radius);
    padding: 1.5rem;
}

.ac-card h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--ac-dark-color);
    border-bottom: 2px solid var(--ac-primary-color);
    padding-bottom: 0.5rem;
    font-size: 1.1rem;
}

.ac-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ac-card-list li {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
}

.ac-card-list .label {
    color: var(--ac-secondary-color);
}

.ac-card-list .value {
    font-weight: 600;
    color: var(--ac-dark-color);
}

.ac-progress-bar-container {
    width: 100%;
    background-color: var(--ac-light-color);
    border: 1px solid var(--ac-border-color);
    border-radius: 30px;
    height: 30px;
    overflow: hidden;
    position: relative;
}

.ac-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--ac-success-color), #218838);
    border-radius: 30px;
    transition: width 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ac-progress-bar-text {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    position: absolute;
    width: 100%;
    text-align: center;
    left: 0;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}