/* 
 * Dealer Styling
 * Contains all CSS related to dealer formatting and frontend features.
 */

.make-offer-btn {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}

.make-offer-btn a.listing-make-offer-btn {
    display: inline-block;
    width: 100%;
    /* 95% width as requested */
    background-color: #ec6c26;
    /* Reddish action color for prominent offer button */
    color: #ffffff !important;
    padding: 10px 15px;
    border-radius: 10px;
    /* 10px rounded corners */
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.5;
    box-sizing: border-box;
    transition: background-color 0.3s ease, transform 0.1s ease;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.make-offer-btn a.listing-make-offer-btn:hover {
    background-color: #c62828;
    color: #ffffff !important;
}

.make-offer-btn a.listing-make-offer-btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

/* Dealer Login Form Styling */
#dealerLoginModal .modal-dialog {
    max-width: 400px;
}

#dealerOfferModal .modal-dialog {
    max-width: 500px;
}

#dealerLoginModal .modal-body,
#dealerOfferModal .modal-body {
    padding: 10px;
}

#dealerLoginModal button.dealer-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    color: #000;
    opacity: 0.5;
    z-index: 10;
    cursor: pointer;
}

#dealerLoginModal button.dealer-modal-close:hover {
    color: #000;
    text-decoration: none;
    opacity: .75;
}

#dealerLoginFormContainer {
    padding: 0px 40px 40px;
}

/* Fix Bootstrap input-group in Offer modal */
#dealerOfferForm .input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

#dealerOfferForm .input-group-prepend {
    display: flex;
}

#dealerOfferForm .input-group .input-group-text {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-right: none;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    color: #333;
    font-size: 16px;
    margin-bottom: 0;
    line-height: 1.5;
    box-sizing: border-box;
    height: 100%;
}

#dealerOfferForm .input-group .form-control {
    flex: 1 1 auto;
    width: 1%;
    border-radius: 0 5px 5px 0;
    padding: 10px;
    border: 1px solid #ddd;
    margin-bottom: 0;
    line-height: 1.5;
    box-sizing: border-box;
    height: auto;
}

#dealerLoginFormContainer form {
    margin-top: 15px;
}

#dealerLoginFormContainer p.login-username,
#dealerLoginFormContainer p.login-password {
    margin-bottom: 15px;
}

#dealerLoginFormContainer label {
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

#dealerLoginFormContainer input[type="text"],
#dealerLoginFormContainer input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

#dealerLoginFormContainer .login-remember {
    margin-top: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

#dealerLoginFormContainer .login-remember label {
    font-weight: normal;
    margin-bottom: 0;
    margin-left: 5px;
    display: inline;
}

#dealerLoginFormContainer .login-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: space-between;
}

#dealerLoginFormContainer .login-actions button.cancel-login-btn {
    flex: 1;
    background-color: #6c757d;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#dealerLoginFormContainer .login-actions button.cancel-login-btn:hover {
    background-color: #5a6268;
}

#dealerLoginFormContainer .login-actions input.submit-login-btn {
    flex: 1;
    width: auto;
    background-color: #ec6c26;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#dealerLoginFormContainer .login-actions input.submit-login-btn:hover {
    background-color: #c62828;
}

/* Custom Dealer Top Panel */
.dealer-top-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: #23282d;
    color: #fff;
    z-index: 999999999 !important;
    display: flex;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 13px;
}

.dealer-panel-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.dealer-panel-welcome strong {
    color: #ec6c26;
    font-weight: 600;
}

.dealer-panel-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.dealer-panel-links a {
    color: #abafb3;
    text-decoration: none;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.dealer-panel-links a:hover,
.dealer-panel-links a:focus {
    color: #00a0d2;
}

.dealer-logout-btn {
    color: #ff6b6b !important;
}

.dealer-logout-btn:hover {
    color: #ff4757 !important;
}

/* Push Site Theme Header Down to prevent overlap */
body.dealer-logged-in-bar {
    padding-top: 40px !important;
}

body.dealer-logged-in-bar #masthead,
body.dealer-logged-in-bar .site-header,
body.dealer-logged-in-bar .ast-above-header-wrap,
body.dealer-logged-in-bar .ast-primary-header-bar,
body.dealer-logged-in-bar .ast-below-header-wrap {
    top: 40px !important;
}

/* Custom Dealer Profile Page */
.dealer-profile-wrapper {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.dealer-profile-header {
    border-bottom: 2px solid #ec6c26;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.dealer-profile-header h3,
.dealer-profile-header h4 {
    color: #23282d;
    margin-bottom: 5px;
    font-weight: 600;
}

.dealer-profile-form label {
    font-weight: 500;
    color: #555;
}

.dealer-profile-form .form-control {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    transition: border-color 0.3s ease;
}

.dealer-profile-form .form-control:focus {
    border-color: #ec6c26;
    box-shadow: 0 0 5px rgba(236, 108, 38, 0.2);
    outline: none;
}

.dealer-save-btn {
    background-color: #ec6c26;
    color: #fff;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dealer-save-btn:hover {
    background-color: #d85a1a;
    color: #fff;
}

/* Custom Dealer Offers Table */
.dealer-offers-container {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
    overflow-x: auto;
}

.dealer-offers-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.dealer-offers-table th,
.dealer-offers-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.dealer-offers-table th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
}

.dealer-offers-table tr:hover td {
    background-color: #fcfcfc;
}

.dealer-offers-table .offer-amount {
    color: #ec6c26;
    font-weight: 600;
}

/* Force Navigation Button Text to White */
.menu-item-dealer-login .ast-custom-button {
    color: #ffffff !important;
    font-size: 1.8125rem !important;
}