/* Gratuity Calculator Stylesheet */
.grat-wrapper {
    font-family: system-ui, -apple-system, sans-serif;
    display: flex;
    justify-content: center;
    padding: 20px 0;
    width: 100%;
    box-sizing: border-box;
}

.grat-container {
    background: #ffffff;
    padding: 24px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    width: 100%;
    max-width: 320px; /* Locked narrow for AdSense space */
    box-sizing: border-box;
}

.grat-container h2 {
    margin-top: 0;
    font-size: 1.5rem;
    color: #1f2937; /* Corporate Charcoal */
    margin-bottom: 20px;
    text-align: center;
    font-weight: 800;
}

.grat-input-group {
    margin-bottom: 16px;
    text-align: left;
}

.grat-row {
    display: flex;
    gap: 10px;
}

.grat-half {
    flex: 1;
    min-width: 0;
}

.grat-input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.grat-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.grat-input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1rem;
    background: #f9fafb;
    color: #111827;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.grat-input-wrapper input {
    padding-left: 30px; 
}

.grat-half input {
    padding-left: 12px; /* Standard padding for the split row */
}

.grat-currency {
    position: absolute;
    left: 12px;
    font-weight: 600;
    color: #6b7280;
}

.grat-note {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
}

.grat-input-group input:focus {
    outline: none;
    border-color: #d97706; /* Amber Focus */
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
    background: #ffffff;
}

.grat-btn {
    width: 100%;
    background: #374151; /* Charcoal */
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 5px;
    transition: background-color 0.2s;
    box-shadow: 0 4px 6px -1px rgba(55, 65, 81, 0.3);
}

.grat-btn:hover {
    background: #d97706; /* Amber Hover */
}

.grat-result-box {
    margin-top: 24px;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    background: #fffbeb; /* Light Amber Tint */
    border: 1px solid #fde68a;
    display: none; 
}

.grat-result-box h3 {
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #b45309;
    letter-spacing: 0.05em;
}

.grat-result-main {
    margin: 10px 0 15px 0;
    font-size: 2.1rem;
    font-weight: 900;
    color: #92400e;
}

.grat-breakdown {
    border-top: 1px solid #fcd34d;
    padding-top: 15px;
    text-align: left;
    font-size: 0.85rem;
    color: #b45309;
}

.grat-breakdown-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.grat-highlight {
    color: #047857; /* Green for safe status */
    font-weight: 800;
}

.grat-warning {
    color: #b91c1c; /* Red for tax status warning */
    font-weight: 800;
}

.grat-rule-note {
    display: block;
    margin-top: 8px;
    font-size: 0.75rem;
    text-align: center;
    color: #78350f;
}