/**
 * Tyre Health Tracker Styles
 */

/* Main container */
.tyre-health-tracker-signup {
    margin: 30px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f4fc 100%);
    border-radius: 12px;
    border: 1px solid #d0e3f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Header section */
.tyre-health-header {
    text-align: center;
    margin-bottom: 25px;
}

.tyre-health-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, var(--tyre-reviews-blue) 0%, var(--tyre-reviews-blue-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tyre-health-icon i {
    font-size: 28px;
    color: #fff;
}

.tyre-health-header h3 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    color: #212529;
}

.tyre-health-subtitle {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
}

/* Estimate section */
.tyre-health-estimate {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid var(--tyre-reviews-blue);
}

.estimate-text {
    margin: 0;
    font-size: 1rem;
    color: #495057;
    line-height: 1.6;
}

.estimate-text strong {
    color: #212529;
}

/* Form styling */
.tyre-health-form {
    max-width: 500px;
    margin: 0 auto;
}

.tyre-health-form .form-group {
    margin-bottom: 20px;
}

.tyre-health-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #212529;
}

.tyre-health-form label i {
    color: var(--tyre-reviews-blue);
    margin-right: 6px;
}

/* Annual mileage input */
.mileage-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mileage-input-wrapper input {
    width: 140px;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
}

.mileage-input-wrapper input:focus {
    border-color: var(--tyre-reviews-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 177, 231, 0.15);
}

.mileage-suffix {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Mileage presets */
.mileage-presets {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    border: 1px solid #dee2e6;
    background: #fff;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.preset-btn:hover {
    border-color: var(--tyre-reviews-blue);
    color: var(--tyre-reviews-blue);
}

.preset-btn.active {
    background: var(--tyre-reviews-blue);
    border-color: var(--tyre-reviews-blue);
    color: #fff;
}

/* Manual reminder options */
.manual-reminder-group .help-text {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.manual-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.manual-option {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.manual-option:hover {
    border-color: var(--tyre-reviews-blue);
}

.manual-option input {
    margin-right: 8px;
}

.manual-option input:checked + span {
    color: var(--tyre-reviews-blue);
    font-weight: 500;
}

/* Reminder type checkboxes */
.reminder-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reminder-checkbox {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.reminder-checkbox:hover {
    border-color: var(--tyre-reviews-blue);
}

.reminder-checkbox input {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    accent-color: var(--tyre-reviews-blue);
}

.checkbox-label {
    display: flex;
    align-items: center;
}

.checkbox-label i {
    margin-right: 8px;
    color: var(--tyre-reviews-blue);
    width: 20px;
}

/* Form actions */
.form-actions {
    text-align: center;
    margin-top: 25px;
}

.tyre-health-submit {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 500;
    background: linear-gradient(135deg, var(--tyre-reviews-blue) 0%, var(--tyre-reviews-blue-dark) 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.tyre-health-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 177, 231, 0.3);
}

.tyre-health-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.tyre-health-skip {
    display: block;
    margin: 15px auto 0;
    color: #6c757d;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.tyre-health-skip:hover {
    color: #495057;
    text-decoration: underline;
}

/* Success state */
.tyre-health-success {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon i {
    font-size: 40px;
    color: #fff;
}

.tyre-health-success h4 {
    margin: 0 0 10px;
    color: #212529;
}

.tyre-health-success p {
    margin: 0;
    color: #6c757d;
}

/* Benefits section */
.tyre-health-benefits {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #dee2e6;
    flex-wrap: wrap;
}

.benefit {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 0.85rem;
}

.benefit i {
    margin-right: 8px;
    color: var(--tyre-reviews-blue);
    font-size: 1rem;
}

/* Dashboard styles */
.tyre-health-dashboard {
    margin-bottom: 30px;
}

.tyre-health-dashboard h3 {
    margin-bottom: 20px;
}

.tyre-health-dashboard h3 i {
    color: var(--tyre-reviews-blue);
    margin-right: 8px;
}

.reminder-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reminder-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    gap: 16px;
}

.reminder-item.reminder-due {
    border-color: #ffc107;
    background: #fffbf0;
}

.reminder-icon {
    width: 44px;
    height: 44px;
    background: #e8f4fc;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reminder-icon i {
    font-size: 1.2rem;
    color: var(--tyre-reviews-blue);
}

.reminder-due .reminder-icon {
    background: #fff3cd;
}

.reminder-due .reminder-icon i {
    color: #856404;
}

.reminder-content {
    flex: 1;
}

.reminder-tyre a {
    font-weight: 500;
    color: #212529;
    text-decoration: none;
}

.reminder-tyre a:hover {
    color: var(--tyre-reviews-blue);
}

.reminder-type {
    font-size: 0.85rem;
    color: #6c757d;
}

.reminder-date {
    font-size: 0.85rem;
    color: #495057;
    margin-top: 4px;
}

.reminder-date i {
    color: #6c757d;
    margin-right: 4px;
}

.reminder-status {
    color: #6c757d;
}

.reminder-due .reminder-status {
    color: #856404;
    font-weight: 500;
}

.reminder-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.cancel-reminder-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .tyre-health-tracker-signup {
        padding: 20px 15px;
        margin: 20px 0;
    }

    .tyre-health-header h3 {
        font-size: 1.25rem;
    }

    .mileage-presets {
        justify-content: center;
    }

    .manual-options {
        flex-direction: column;
    }

    .tyre-health-benefits {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .reminder-item {
        flex-wrap: wrap;
    }

    .reminder-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid #eee;
    }
}

/* ================================
   Tool Page Styles
   ================================ */

.tyre-health-tool {
    max-width: 800px;
}

.tyre-health-tool h1 {
    margin-bottom: 10px;
}

.tyre-health-tool h1 i {
    color: var(--tyre-reviews-blue);
}

.tyre-health-tool .lead {
    color: #6c757d;
    margin-bottom: 30px;
}

.tool-step {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.tool-step h3 {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--tyre-reviews-blue);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1rem;
    font-weight: bold;
}

/* Tyre search in tool */
.tyre-search-wrapper {
    position: relative;
}

.tyre-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.selected-tyre-display {
    background: #e8f4fc;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--tyre-reviews-blue);
}

.selected-tyre-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Expected lifespan info */
.expected-lifespan-info {
    margin-top: 15px;
}

.expected-lifespan-info .alert {
    margin-bottom: 0;
}

/* Benefits sidebar */
.tyre-health-benefits-sidebar {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.tyre-health-benefits-sidebar h4 {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    padding: 8px 0;
    color: #495057;
}

.benefits-list li i {
    margin-right: 10px;
    width: 20px;
}

/* Email capture */
.email-capture label {
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.logged-in-notice {
    background: #e8f4fc;
    padding: 15px;
    border-radius: 6px;
}

.logged-in-notice p {
    margin: 0;
}

/* Search dropdown items */
.tyre-search-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background 0.15s;
}

.tyre-search-item:last-child {
    border-bottom: none;
}

.tyre-search-item:hover {
    background: #f0f7fc;
}

.tyre-search-item .tyre-thumb {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-right: 12px;
    flex-shrink: 0;
}

.tyre-search-item .tyre-info {
    display: flex;
    flex-direction: column;
}

.tyre-search-item .tyre-name {
    font-weight: 500;
    color: #212529;
}

.tyre-search-item .tyre-reviews {
    font-size: 0.85em;
    color: #6c757d;
}

.tyre-search-results .no-results {
    padding: 15px;
    text-align: center;
    color: #6c757d;
}

/* Form error handling */
.form-error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.form-error-message i {
    margin-right: 8px;
}

/* Email field validation */
.email-capture .form-control.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

.email-capture .form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.email-capture .invalid-feedback {
    display: none;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 6px;
}

.email-capture .form-control.is-invalid + .invalid-feedback {
    display: block;
}

.email-capture .email-help {
    display: block;
    margin-top: 6px;
}

.email-capture .form-control.is-invalid ~ .email-help {
    display: none;
}

/* User tyres list */
.user-tyres-list {
    margin-bottom: 20px;
}

.user-tyres-list label {
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
}

.user-tyre-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.user-tyre-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.user-tyre-btn .badge {
    font-weight: normal;
}
