/**
 * My Garage - CSS Styling (Modal Version)
 */

/* Navigation Link - Icon Only Style */
.mygarage-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    text-decoration: none;
}

.mygarage-icon-link .material-icons {
    font-size: 24px;
    vertical-align: middle;
}

.mygarage-icon-link .mygarage-badge-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #dc3545;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    line-height: 1.2;
}

/* Hover effect */
.mygarage-icon-link:hover .material-icons {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Modal Overlay & Container */
.mygarage-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.mygarage-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.mygarage-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Modal Header */
.mygarage-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #ffffff;
    color: #222222;
    border-bottom: 1px solid #e5e5e5;
    border-radius: 12px 12px 0 0;
}

.mygarage-modal-header h2 {
    margin: 0;
    font-weight: 500;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mygarage-modal-header .material-icons {
    font-size: 28px;
}

.mygarage-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.mygarage-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Modal Body */
.mygarage-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Loading State */
.mygarage-loading {
    text-align: center;
    padding: 40px 20px;
}

.mygarage-loading .material-icons {
    font-size: 48px;
    color: #25b9d7;
    margin-bottom: 15px;
}

.mygarage-loading .material-icons.rotating {
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mygarage-loading p {
    color: #666;
    margin: 0;
}

/* Header Section in Modal */
.mygarage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.mygarage-description p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Add Vehicle Form */
.mygarage-add-form {
    background: #f8f9fa;
    border: 2px solid #25b9d7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.mygarage-add-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.mygarage-add-form-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.mygarage-add-form-header .close {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.mygarage-selects-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 10px;
    align-items: end;
}

.mygarage-selects-wrapper select,
.mygarage-selects-wrapper button {
    height: 40px;
}

.mygarage-selects-wrapper button .material-icons {
    font-size: 18px;
    vertical-align: middle;
    margin-right: 5px;
}

/* Vehicle Items List */
.mygarage-vehicles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mygarage-vehicle-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
}

.mygarage-vehicle-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #25b9d7;
}

.vehicle-item-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #25b9d7 0%, #1e9bb8 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vehicle-item-icon .material-icons {
    font-size: 28px;
    color: white;
}

.vehicle-item-info {
    flex-grow: 1;
}

.vehicle-item-brand {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.vehicle-item-model {
    font-size: 16px;
    margin-bottom: 5px;
}

.vehicle-item-model strong {
    color: #333;
}

.vehicle-generation {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.vehicle-item-details {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

.vehicle-item-details > span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vehicle-item-details .material-icons {
    font-size: 16px;
    color: #25b9d7;
}

.vehicle-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.vehicle-item-actions .btn {
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.vehicle-item-actions .btn .material-icons {
    font-size: 18px;
}

/* Empty State */
.mygarage-empty {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.mygarage-empty .material-icons {
    font-size: 80px;
    color: #d0d0d0;
    margin-bottom: 15px;
}

.mygarage-empty h4 {
    font-size: 18px;
    color: #666;
    margin-bottom: 10px;
}

.mygarage-empty p {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* Login Message */
.mygarage-login-message {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    margin-bottom: 20px;
    background: #e7f6f9;
    border: 1px solid #25b9d7;
    border-radius: 8px;
}

.mygarage-login-message .material-icons {
    font-size: 36px;
    color: #25b9d7;
    flex-shrink: 0;
}

.mygarage-login-message h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
}

.mygarage-login-message p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #666;
}

.mygarage-login-message .btn .material-icons {
    font-size: 18px;
    vertical-align: middle;
    margin-right: 5px;
}

/* Favorite Button in Vehicle Selector */
.btn-favorite-vehicle {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-favorite-vehicle:hover:not(:disabled) {
    background: white;
    color: #25b9d7;
}

.btn-favorite-vehicle.is-favorite {
    background: #ff4757;
    border-color: #ff4757;
}

.btn-favorite-vehicle:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-favorite-vehicle .material-icons {
    font-size: 20px;
}

.carpartfinder-selected-badge .badge-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .mygarage-modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .mygarage-modal-header {
        padding: 15px 20px;
    }

    .mygarage-modal-header h2 {
        font-size: 20px;
    }

    .mygarage-modal-body {
        padding: 20px;
    }

    .mygarage-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .mygarage-selects-wrapper {
        grid-template-columns: 1fr;
    }

    .mygarage-vehicle-item {
        flex-direction: column;
        text-align: center;
    }

    .vehicle-item-actions {
        width: 100%;
        flex-direction: column;
    }

    .vehicle-item-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .vehicle-item-details {
        flex-direction: column;
        gap: 8px;
    }
}

/* Legacy page support (if someone navigates directly to /mygarage) */

/* My Garage Page */
.mygarage-page {
    padding: 20px 0;
}

.mygarage-page .page-header h1 .material-icons {
    font-size: 36px;
    vertical-align: middle;
    margin-right: 10px;
    color: #25b9d7;
}

/* Login Message */
.mygarage-login-message {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
}

.mygarage-login-message .material-icons {
    font-size: 48px;
    color: #0dcaf0;
}

.mygarage-login-message h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.mygarage-login-message p {
    margin: 0 0 15px 0;
}

/* Header Section */
.mygarage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.mygarage-description p {
    margin: 0;
    font-size: 16px;
    color: #666;
}

.mygarage-add-vehicle button .material-icons {
    font-size: 20px;
    vertical-align: middle;
    margin-right: 5px;
}

/* Vehicle Selector Form */
.mygarage-selector {
    margin-bottom: 30px;
}

.mygarage-selector .card {
    border: 2px solid #25b9d7;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mygarage-selector .card-header {
    background: #25b9d7;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.mygarage-selector .card-header h3 {
    margin: 0;
    font-size: 18px;
}

.mygarage-selector .card-header .close {
    color: white;
    opacity: 1;
    font-size: 32px;
    cursor: pointer;
    background: none;
    border: none;
}

.mygarage-selector .card-body {
    padding: 20px;
}

.mygarage-selector .card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
}

/* Vehicle Cards Grid */
.mygarage-vehicles .row {
    margin: 0 -10px;
}

.mygarage-vehicle-col {
    padding: 0 10px;
    margin-bottom: 20px;
}

.mygarage-vehicle-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mygarage-vehicle-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Vehicle Card Header */
.vehicle-card-header {
    background: linear-gradient(135deg, #25b9d7 0%, #1e9bb8 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
}

.vehicle-card-header .vehicle-brand {
    margin: 0 0 5px 0;
    font-size: 20px;
    font-weight: 700;
}

.vehicle-card-header .vehicle-nickname {
    font-size: 14px;
    opacity: 0.9;
    font-style: italic;
}

/* Vehicle Card Body */
.vehicle-card-body {
    padding: 20px;
    flex-grow: 1;
}

.vehicle-info .vehicle-model {
    margin-bottom: 15px;
}

.vehicle-info .vehicle-model strong {
    font-size: 18px;
    color: #333;
}

.vehicle-info .vehicle-generation {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
}

.vehicle-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vehicle-details > span {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.vehicle-details .material-icons {
    font-size: 18px;
    margin-right: 8px;
    color: #25b9d7;
}

/* Vehicle Card Footer */
.vehicle-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
}

.vehicle-card-footer .btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

.vehicle-card-footer .btn .material-icons {
    font-size: 18px;
}

.vehicle-card-date {
    padding: 8px 20px;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
    text-align: center;
}

.vehicle-card-date small {
    color: #999;
    font-size: 12px;
}

/* Empty State */
.mygarage-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 30px;
}

.mygarage-empty .material-icons {
    font-size: 120px;
    color: #d0d0d0;
    margin-bottom: 20px;
}

.mygarage-empty h3 {
    font-size: 24px;
    color: #666;
    margin-bottom: 15px;
}

.mygarage-empty p {
    font-size: 16px;
    color: #999;
    margin-bottom: 30px;
}

.mygarage-empty button .material-icons {
    font-size: 24px;
    vertical-align: middle;
    margin-right: 8px;
}

/* Favorite Button in Vehicle Selector */
.btn-favorite-vehicle {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.btn-favorite-vehicle:hover:not(:disabled) {
    background: white;
    color: #25b9d7;
}

.btn-favorite-vehicle.is-favorite {
    background: #ff4757;
    border-color: #ff4757;
}

.btn-favorite-vehicle:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-favorite-vehicle .material-icons {
    font-size: 20px;
}

.carpartfinder-selected-badge .badge-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .mygarage-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .mygarage-vehicle-col {
        padding: 0 5px;
    }

    .vehicle-card-footer {
        flex-direction: column;
    }

    .vehicle-card-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .mygarage-login-message {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================================================
   MINIMALIST THEME OVERRIDE - Simple Gray Design
   ============================================================================ */

/* Modal footer */
.mygarage-modal-footer {
    background: #fafafa !important;
    border-top: 1px solid #e5e5e5 !important;
    padding: 1rem 1.5rem !important;
}

/* Modal overlay - subtle */
.mygarage-modal-overlay {
    background: rgba(0, 0, 0, 0.4) !important;
}

/* Modal container */
.mygarage-modal-content {
    border-radius: 6px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e5e5e5 !important;
}

/* Modal header - ultra minimal */
.mygarage-modal-header {
    background: #ffffff !important;
    border: 0 !important;
    border-bottom: 1px solid #e5e5e5 !important;
    color: #222222 !important;
    padding: 1.25rem 1.5rem !important;
}

.mygarage-modal-header h2 {
    font-size: 18px !important;
    font-weight: 500 !important;
    margin: 0 !important;
    color: #222222 !important;
}

.mygarage-modal-header .material-icons {
    color: #666666 !important;
    margin-right: 8px !important;
    font-size: 20px !important;
}

.mygarage-login-message,
.mygarage-add-form {
    background: #fafafa !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 4px !important;
    color: #666666 !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
    font-size: 14px !important;
}

/* Add vehicle button */
.mygarage-add-vehicle-btn,
button[data-action="add-vehicle"] {
    background: #ffffff !important;
    border: 1px dashed #cccccc !important;
    color: #666666 !important;
    border-radius: 4px !important;
    padding: 0.75rem !important;
    font-size: 13px !important;
}

.mygarage-add-vehicle-btn:hover,
button[data-action="add-vehicle"]:hover {
    background: #f8f8f8 !important;
    border-color: #999999 !important;
    color: #222222 !important;
}

/* Buttons - minimal gray style */
.mygarage-modal .btn-primary,
.mygarage-modal .btn,
button[id*="mygarage"] {
    background: #f8f8f8 !important;
    border: 1px solid #e5e5e5 !important;
    color: #222222 !important;
    font-weight: 400 !important;
    text-transform: none !important;
    transition: all 0.15s ease !important;
    padding: 8px 16px !important;
    border-radius: 3px !important;
    font-size: 13px !important;
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mygarage-modal .btn-primary:hover,
.mygarage-modal .btn:hover,
button[id*="mygarage"]:hover {
    background: #eeeeee !important;
    border-color: #cccccc !important;
    color: #000000 !important;
}

/* Modal body - compact */
.mygarage-modal-body {
    padding: 1.25rem 1.5rem !important;
    background: #ffffff !important;
}

.mygarage-modal-body p {
    color: #666666 !important;
    font-size: 14px !important;
    margin-bottom: 1.25rem !important;
}

/* Vehicle cards - minimal gray */
.vehicle-card-select {
    background: #ffffff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 4px !important;
    transition: all 0.15s ease !important;
    padding: 1rem !important;
}

.vehicle-card-select:hover {
    border-color: #cccccc !important;
    background: #fafafa !important;
}

.mygarage-vehicle-item.selected .vehicle-card-select {
    background: #f8f8f8 !important;
    border: 1px solid #999999 !important;
}

/* Vehicle icon - gray instead of blue */
.vehicle-card-icon,
.mygarage-vehicle-icon {
    background: #f0f0f0 !important;
    color: #666666 !important;
    border-radius: 4px !important;
}

.vehicle-card-icon .material-icons,
.mygarage-vehicle-icon .material-icons {
    color: #666666 !important;
}

/* Close button - subtle */
.mygarage-modal-close {
    background: transparent !important;
    border: 0 !important;
    font-size: 24px !important;
    color: #cccccc !important;
    padding: 0 !important;
    min-height: auto !important;
    line-height: 1 !important;
    cursor: pointer !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.mygarage-modal-close:hover {
    color: #666666 !important;
    background: #f8f8f8 !important;
    border-radius: 3px !important;
}

/* Links - subtle */
.mygarage-modal a {
    color: #666666 !important;
    text-decoration: none !important;
}

.mygarage-modal a:hover {
    color: #222222 !important;
    text-decoration: underline !important;
}

/* Info box and messages */
.mygarage-login-message .material-icons,
.mygarage-add-form .material-icons {
    color: #999999 !important;
    margin-right: 8px !important;
    font-size: 18px !important;
}

/* Delete button (trash icon) */
.mygarage-delete-vehicle,
button[data-action="delete-vehicle"] {
    background: transparent !important;
    border: 0 !important;
    color: #cccccc !important;
    padding: 0.5rem !important;
    min-height: auto !important;
}

.mygarage-delete-vehicle:hover,
button[data-action="delete-vehicle"]:hover {
    color: #999999 !important;
    background: #f8f8f8 !important;
    border-radius: 3px !important;
}

.mygarage-empty-message {
    text-align: center !important;
    padding: 3rem 1.5rem !important;
    color: #999999 !important;
    font-size: 14px !important;
}

/* General modal text */
.mygarage-modal {
    font-family: inherit !important;
}

.mygarage-modal * {
    box-sizing: border-box !important;
}

/* Remove excessive spacing */
.mygarage-modal .row {
    margin-left: -0.5rem !important;
    margin-right: -0.5rem !important;
}

.mygarage-modal .col,
.mygarage-modal [class*="col-"] {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

/* Find Parts button - primary action */
.mygarage-find-parts-btn,
button[data-action="find-parts"] {
    background: #222222 !important;
    border: 1px solid #222222 !important;
    color: #ffffff !important;
    font-weight: 400 !important;
}

.mygarage-find-parts-btn:hover,
button[data-action="find-parts"]:hover {
    background: #000000 !important;
    border-color: #000000 !important;
    color: #ffffff !important;
}

/* Selected state - radio button */
.vehicle-card-radio:checked + .vehicle-card-select::before {
    background: #222222 !important;
    border-color: #222222 !important;
}

/* Vehicle card content */
.vehicle-card-content {
    padding: 0 !important;
}

.vehicle-card-title,
.mygarage-vehicle-name {
    font-weight: 500 !important;
    color: #222222 !important;
    margin-bottom: 0.25rem !important;
    font-size: 14px !important;
}

.vehicle-card-details,
.mygarage-vehicle-year {
    color: #999999 !important;
    font-size: 12px !important;
}

/* Vehicle card layout */
.mygarage-vehicle-item {
    margin-bottom: 0.75rem !important;
}

.mygarage-vehicle-item:last-child {
    margin-bottom: 0 !important;
}

/* Icon in header - larger size for better visibility */
.mygarage-icon-link .material-icons {
    font-size: 28px !important;
    font-weight: 300 !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.mygarage-modal-header .material-icons {
    font-size: 22px !important;
    font-weight: 300 !important;
    vertical-align: middle !important;
}
