/* Global Button Styles - CarCompass */

/* Base Button Styles */
.btn-base {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 1px solid;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Seravek', sans-serif;
    line-height: 1.2;
    vertical-align: middle;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.btn-base:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

.btn-base:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button Sizes */
.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-x-small {
    padding: 5px 10px;
    font-size: 11px;
}

.btn-xx-small {
    padding: 4px 6px;
    font-size: 10px;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-xl {
    padding: 20px 40px;
    font-size: 20px;
}

.btn-full {
    width: 100%;
}

/* Sand Button - Primary Brand Color */
.btn-sand {
    background-color: #f3e0ab;
    color: #000000;
    border-color: #000000;
}

.btn-sand:hover {
    background-color: #fae7b9;
    border-color: #333333;
    color: #000000;
}

.btn-sand:active {
    background-color: #d9c288;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Teal Button - Secondary Brand Color */
.btn-teal {
    background-color: #009d9a;
    color: #ffffff;
    border-color: #009d9a;
}

.btn-teal:hover {
    background-color: #007a78;
    border-color: #007a78;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 157, 154, 0.3);
}

.btn-teal:active {
    background-color: #006b69;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 157, 154, 0.2);
}

/* Red Button - Danger/Action Color */
.btn-red {
    background-color: #dc3545;
    color: #ffffff;
    border-color: #dc3545;
}

.btn-red:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-red:active {
    background-color: #bd2130;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

/* Grey Button - Neutral/Secondary Color */
.btn-grey {
    background-color: #6c757d;
    color: #ffffff;
    border-color: #6c757d;
}

.btn-grey:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn-grey:active {
    background-color: #545b62;
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(108, 117, 125, 0.2);
}

/* Outline Button Variants */
.btn-outline-sand {
    background-color: transparent;
    color: #000000;
    border-color: #f3e0ab;
}

.btn-outline-sand:hover {
    background-color: #f3e0ab;
    color: #000000;
    border-color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(243, 224, 171, 0.3);
}

.btn-outline-teal {
    background-color: transparent;
    color: #009d9a;
    border-color: #009d9a;
}

.btn-outline-teal:hover {
    background-color: #009d9a;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 157, 154, 0.3);
}

.btn-outline-red {
    background-color: transparent;
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-red:hover {
    background-color: #dc3545;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-outline-grey {
    background-color: transparent;
    color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-grey:hover {
    background-color: #6c757d;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Outline White Button - For light backgrounds */
.btn-outline-white {
    background-color: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

.btn-outline-white:hover {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 255, 255, 0.3);
}

/* Button with Icons */
.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-with-icon i {
    font-size: 0.9em;
}

/* Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Form Input Styles - Brand Guidelines */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 16px;
    font-family: 'Seravek', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
    background-color: #ffffff;
    color: #333333;
    width: 100%;
    box-sizing: border-box;
}

.form-control:focus {
    border-color: #009d9a;
    box-shadow: 0 0 0 0.2rem rgba(0, 157, 154, 0.25);
    outline: none;
    background-color: #ffffff;
}

.form-control::placeholder {
    color: #6c757d;
    font-style: italic;
}

.form-control:invalid {
    border-color: #dc3545;
}

.form-control:valid {
    border-color: #009d9a;
}

/* Override browser autofill styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus,
select:-webkit-autofill:active,
.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus,
.form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #333333 !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    border-color: #e9ecef !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

input:-webkit-autofill:focus,
textarea:-webkit-autofill:focus,
select:-webkit-autofill:focus,
.form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset, 0 0 0 0.2rem rgba(0, 157, 154, 0.25) !important;
    border-color: #009d9a !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
}

/* Form Labels - Brand Guidelines */
.form-label {
    color: #333333;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    display: block;
    font-family: 'Seravek', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.form-label.required::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

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

.form-group:last-child {
    margin-bottom: 0;
}

/* Form Text Helper */
.form-text {
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
    font-family: 'Seravek', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Form Check (Checkboxes/Radio) */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-top: 2px;
    border: 2px solid #009d9a;
    border-radius: 4px;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #009d9a;
    border-color: #009d9a;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 157, 154, 0.25);
    outline: none;
}

.form-check-label {
    color: #333333;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Seravek', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin-left: 31px !important;
}

/* Textarea Specific */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Select Dropdown */
select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* File Input */
input[type="file"].form-control {
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 2px dashed #009d9a;
}

input[type="file"].form-control:focus {
    border-style: solid;
    background-color: #ffffff;
}

/* Form Validation States */
.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 14px;
    color: #dc3545;
    font-family: 'Seravek', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 5px;
    font-size: 14px;
    color: #28a745;
    font-family: 'Seravek', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Form Container */
.form-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .btn-base {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn-large {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .btn-xl {
        padding: 16px 32px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .btn-base {
        padding: 8px 16px;
        font-size: 14px;
        width: 100%;
    }
    
    .btn-large {
        padding: 12px 24px;
        font-size: 16px;
    }
    
    .btn-xl {
        padding: 14px 28px;
        font-size: 18px;
    }

    .btn-x-small {
        padding: 5px 10px;
        font-size: 11px;
    }

    .btn-xx-small {
        padding: 3px 3px;
        font-size: 9px;
    }

    .form-control {
        padding: 10px 14px;
        font-size: 16px;
    }

    .form-label {
        font-size: 15px;
    }

    .form-container {
        padding: 20px;
    }
}

/* Utility Classes */
.btn-no-border {
    border: none !important;
}

.btn-rounded {
    border-radius: 25px !important;
}

.btn-square {
    border-radius: 0 !important;
}

.btn-shadow {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-shadow:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Mobile User Icon Styling */
@media (max-width: 1200px) {
    ul.accoutNav.mobile {
        position: absolute;
        right: 60px; /* Position to the left of hamburger menu */
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        z-index: 3;
    }
    
    ul.accoutNav.mobile li a {
        color: #ffffff !important;
        font-size: 20px;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
    }
    
    ul.accoutNav.mobile li a i {
        color: #ffffff !important;
        font-size: 20px;
        margin: 0;
    }
    
    ul.accoutNav.mobile li a:hover {
        color: #ffffff !important;
        background-color: transparent !important;
    }
    
    ul.accoutNav.mobile li a:hover i {
        color: #ffffff !important;
    }
}

/* ========================================
   VEHICLE CARD ICON COMPONENT
   ======================================== */

/* Vehicle Card Icon Container */
.vehicle-card-icons {
    position: absolute;
    right: 10px;
    top: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Base Vehicle Card Icon Styles - All icons are exactly 40px */

/* Vehicle Card Icon Hover States */
.vehicle-card-icon:hover {
    background: #009d9a !important;
    border-color: #009d9a !important;
    color: #fff !important;
}

/* Vehicle Card Icon Active State */
.vehicle-card-icon.active {
    background: #009d9a !important;
    border-color: #009d9a !important;
    color: #fff !important;
}

/* Vehicle Card Icon Font Sizes */
.vehicle-card-icon i {
    font-size: 14px !important;
    color: #fff !important;
    line-height: 1 !important;
}

/* X.com icon styling */
.x-icon {
    font-size: 16px;
    font-weight: bold;
    color: inherit;
    display: inline-block;
    line-height: 1;
}

/* Loading state for share buttons */
.share-option.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.share-option.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

/* Specific Icon Types */
.vehicle-card-icon.favorite-icon {
    /* Heart icon specific styling if needed */
    /* Currently no specific styling needed */
}

.vehicle-card-icon.compare-icon {
    /* Compare icon specific styling if needed */
    /* Currently no specific styling needed */
}

.vehicle-card-icon.share-icon {
    /* Share icon specific styling if needed */
    /* Currently no specific styling needed */
}

/* Modern Share Button in Vehicle Cards */


.vehicle-card-icons .modern-share-container .modern-share-btn:hover {
    background: #009d9a !important;
    border-color: #009d9a !important;
    color: #fff !important;
}

.vehicle-card-icons .modern-share-container .modern-share-btn i {
    font-size: 14px !important;
    color: #fff !important;
}

/* Mobile Responsive - Vehicle Card Icons */
@media (max-width: 768px) {
    .vehicle-card-icons {
        position: absolute;
        right: 1px;
        bottom: -16px;
        top: auto;
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .vehicle-card-icon {
        width: 40px !important;
        height: 40px !important;
        margin: 0 !important;
    }
    
    .vehicle-card-icons .modern-share-container .modern-share-btn {
        width: 40px !important;
        height: 40px !important;
        margin: 0 !important;
    }
}

/* Desktop Responsive - Vehicle Card Text */
@media (min-width: 1366px) {
    .vehicle-first-line {
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        height: auto !important;
        line-height: 1.2 !important;
        margin-bottom: 10px !important;
        min-height: 1.2em !important;
    }
    
    .vehicle-second-line {
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        height: auto !important;
        margin-bottom: 1px !important;
    }
    
    /* Ensure consistent card heights */
    .vehicle-name-display {
        height: auto !important;
        min-height: 3.6em !important; /* Reserve space for both lines */
        overflow: visible !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
    }
    
    .boxInfo {
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
    }
    
    /* Ensure all featureBox cards have consistent height */
    .featureBox {
        height: auto !important;
        min-height: auto !important; /* Set minimum height for consistency */
        display: flex !important;
        flex-direction: column !important;
    }
    
    .featureBox .boxInfo {
        flex-grow: 1 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
}

/* Override any existing styles that might conflict - Only target icon elements */
.imgBox ul li a.vehicle-card-icon,
.imgBox ul li .vehicle-card-icon,
.imgBox ul li a[class*="favourite-vehicle"],
.imgBox ul li a[class*="btnCompare"],
.imgBox ul li .modern-share-container .modern-share-btn {
    width: 30px;
    height: 30px;
    background: #333333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    transition: all 0.3s ease;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    flex-grow: 0;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
}

/* Ensure vehicle card containers maintain their original structure */
.featureBox {
    background: #fff;
    border: 2px solid #009d9a;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 40px;
    height: auto !important;
}

/* Override the problematic height: 100% from style.css */
.row .col-md-3 .featureBox {
    width: 100% !important;
    height: auto !important;
}

.row .col-md-4 .featureBox {
    width: 100% !important;
    height: auto !important;
}

/* Ensure column containers don't cause elongation */
.row .col-md-3,
.row .col-md-4 {
    display: block !important;
    height: auto !important;
}

.featureBox .imgBox {
    height: auto !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.featureBox .imgBox img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Ensure boxInfo maintains proper styling */
.featureBox .boxInfo {
    padding: 0 20px;
    position: relative;
}

.featureBox .boxInfo h5 {
    font-size: 18px;
    color: #000;
    font-weight: 600;
    margin: 5px 0 0px 0px;
    border-radius: 3px;
    display: inline-block;
    padding: 10px 10px 10px 0px;
}

.featureBox .boxInfo h6 {
    color: #545454;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
}

.imgBox ul li a.vehicle-card-icon:hover,
.imgBox ul li .vehicle-card-icon:hover,
.imgBox ul li a[class*="favourite-vehicle"]:hover,
.imgBox ul li a[class*="btnCompare"]:hover,
.imgBox ul li .modern-share-container .modern-share-btn:hover {
    background: #009d9a !important;
    border-color: #009d9a !important;
    color: #fff !important;
}

.imgBox ul li a.vehicle-card-icon i,
.imgBox ul li .vehicle-card-icon i,
.imgBox ul li a[class*="favourite-vehicle"] i,
.imgBox ul li a[class*="btnCompare"] i,
.imgBox ul li .modern-share-container .modern-share-btn i {
    font-size: 14px !important;
    color: #fff !important;
    line-height: 1 !important;
}

/* Active states */
.imgBox ul li a.vehicle-card-icon.active,
.imgBox ul li .vehicle-card-icon.active,
.imgBox ul li a[class*="favourite-vehicle"].active,
.imgBox ul li a[class*="btnCompare"].active {
    background: #009d9a !important;
    border-color: #009d9a !important;
    color: #fff !important;
}

.alert-success {
    color: #009d9a;
    background-color: #ffffff;
    border-color: #009d9a;
}
.alert-danger {
    color: #ffffff;
    background-color: #626262;
    border-color: #111820;
}

.alert-danger p {
    color: #ffffff;
}

.badge-success {
    background-color: #009d9a;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.badge-danger {
    background-color: #111820;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.badge-warning {
    background-color: #626262;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}
.badge-info {
    background-color: #009d9a;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.modal-header {
	background-color: #009d9a;
}

.modal-header .modal-title {
    color: #ffffff !important;
    font-weight: 600;
}

.modal-header .close {
    color: #ffffff !important;
}
.close {
    text-shadow: none;
    opacity: 1;
}

/* Deactivation Modal Specific Styles */


.modal-footer .btn-primary {
    background: #f3e0ab !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    font-weight: 600 !important;
    border-radius: 3px !important;
}

.modal-footer .btn-primary:hover {
    background: #e6d19a !important;
    border-color: #333333 !important;
    color: #000000 !important;
}

.modal-footer .btn-secondary {
    background: #6c757d !important;
    color: white !important;
    border: 2px solid #6c757d !important;
    font-weight: 600 !important;
    border-radius: 3px !important;
}

.modal-footer .btn-secondary:hover {
    background: #5a6268 !important;
    border-color: #545b62 !important;
}

.modal-footer .btn-success {
    background: #f3e0ab !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    font-weight: 600 !important;
    border-radius: 3px !important;
}

.modal-footer .btn-success:hover {
    background: #e6d19a !important;
    border-color: #333333 !important;
    color: #000000 !important;
}
