/* ==========================================================================
   Horse Ads – ASCHK style
   Primary: #0081D5 | Dark: #002B47 | Light bg: #f5f7fa
   ========================================================================== */

/* --- Form Wrapper --- */

.horse-ad-form-wrapper {
    max-width: 820px;
    margin: 2.5rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- Notice Banner --- */

.horse-ad-form-wrapper .horse-ad-notice {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: #f5f7fa;
    border: none;
    border-left: 4px solid #0081D5;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0;
}

.horse-ad-form-wrapper .horse-ad-notice-icon {
    flex-shrink: 0;
    color: #0081D5;
    margin-top: 2px;
}

.horse-ad-form-wrapper .horse-ad-notice p {
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #313131;
}

/* --- Form --- */

form.horse-ad-form {
    background: #fff;
    border: 1px solid #dde2e8;
    border-radius: 0;
    padding: 0;
    margin: 0;
    box-shadow: none;
}

/* --- Fieldsets --- */

form.horse-ad-form fieldset.horse-ad-fieldset {
    border: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: none !important;
    margin: 0;
    padding: 2rem 2rem 1rem;
    background: transparent;
    min-width: 0;
}

form.horse-ad-form fieldset.horse-ad-fieldset + fieldset.horse-ad-fieldset {
    border-top: 1px solid #dde2e8 !important;
}

form.horse-ad-form fieldset.horse-ad-fieldset legend {
    display: block;
    width: auto;
    float: none;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #0081D5;
    padding: 0;
    margin: 0 0 1.5rem 0;
    border: none;
    background: transparent;
    position: relative;
    font-style: normal;
}

form.horse-ad-form fieldset.horse-ad-fieldset legend::after {
    content: '';
    display: block;
    margin-top: 6px;
    width: 40px;
    height: 2px;
    background: #0081D5;
}

/* --- Grid --- */

.horse-ad-form-wrapper .horse-ad-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.5rem;
}

.horse-ad-form-wrapper .horse-ad-grid--3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 600px) {
    .horse-ad-form-wrapper .horse-ad-grid,
    .horse-ad-form-wrapper .horse-ad-grid--3 {
        grid-template-columns: 1fr;
    }
}

/* --- Fields --- */

.horse-ad-form-wrapper .horse-ad-field {
    margin-bottom: 1.25rem;
}

.horse-ad-form-wrapper .horse-ad-field > label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: #002B47;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-style: normal;
    line-height: 1.4;
}

.horse-ad-form-wrapper .horse-ad-field > label .required {
    color: #c0392b;
    margin-left: 2px;
    font-weight: 700;
}

.horse-ad-form-wrapper .horse-ad-field input[type="text"],
.horse-ad-form-wrapper .horse-ad-field input[type="email"],
.horse-ad-form-wrapper .horse-ad-field input[type="tel"],
.horse-ad-form-wrapper .horse-ad-field input[type="date"],
.horse-ad-form-wrapper .horse-ad-field select,
.horse-ad-form-wrapper .horse-ad-field textarea {
    display: block;
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid #ccd3db;
    border-radius: 0;
    font-size: 0.95rem;
    color: #313131;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    line-height: 1.5;
    height: auto;
    max-width: 100%;
    margin: 0;
}

/* Restore select arrow */
.horse-ad-form-wrapper .horse-ad-field select {
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
    appearance: menulist;
    padding-right: 2rem;
}

.horse-ad-form-wrapper .horse-ad-field input:focus,
.horse-ad-form-wrapper .horse-ad-field select:focus,
.horse-ad-form-wrapper .horse-ad-field textarea:focus {
    border-color: #0081D5;
    box-shadow: 0 0 0 3px rgba(0, 129, 213, 0.1);
}

.horse-ad-form-wrapper .horse-ad-field input::placeholder,
.horse-ad-form-wrapper .horse-ad-field textarea::placeholder {
    color: #a0aab4;
}

.horse-ad-form-wrapper .horse-ad-field textarea {
    resize: vertical;
    min-height: 120px;
}

/* --- Upload area --- */

.horse-ad-form-wrapper .horse-ad-upload-area {
    position: relative;
    border: 2px dashed #ccd3db;
    border-radius: 0;
    padding: 1.5rem;
    text-align: center;
    background: #f9fafb;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.horse-ad-form-wrapper .horse-ad-upload-area:hover {
    border-color: #0081D5;
    background: #f0f7fc;
}

.horse-ad-form-wrapper .horse-ad-upload-area input[type="file"] {
    border: none !important;
    background: none !important;
    padding: 0 !important;
    font-size: 0.9rem;
    box-shadow: none !important;
    width: auto;
    display: inline-block;
    -webkit-appearance: none;
    appearance: none;
}

.horse-ad-form-wrapper .horse-ad-upload-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.78rem;
    color: #8c96a0;
    line-height: 1.4;
}

/* --- Submit --- */

.horse-ad-form-wrapper .horse-ad-submit {
    padding: 1.5rem 2rem 2rem;
    text-align: right;
}

.horse-ad-form-wrapper .horse-ad-submit button {
    display: inline-block;
    background: #0081D5;
    color: #fff;
    border: none;
    border-radius: 0;
    padding: 0.75rem 3rem;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: inherit;
    line-height: 1.5;
}

.horse-ad-form-wrapper .horse-ad-submit button:hover {
    background: #002B47;
}

/* --- Alerts (success / error) --- */

.horse-ad-form-wrapper .alert.alert-success,
.horse-ad-form-wrapper .alert.alert-danger {
    border-radius: 0;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
}

.alert.alert-info {
    background-color: #f5f7fa;
    border: 1px solid #dde2e8;
    border-left: 4px solid #0081D5;
    border-radius: 0;
    color: #002B47;
}

.alert.alert-success {
    background-color: #eef8f0;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #28a745;
    border-radius: 0;
    color: #1a5c2b;
}

.alert.alert-danger {
    background-color: #fdf0f0;
    border: 1px solid #f5c6cb;
    border-left: 4px solid #c0392b;
    border-radius: 0;
    color: #721c24;
}

.alert.alert-danger ul {
    padding-left: 1.2rem;
    margin: 0;
}

/* ==========================================================================
   Ad List / Cards
   ========================================================================== */

.horse-ads-list .horse-ad-card {
    border: 1px solid #dde2e8;
    border-radius: 0;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.horse-ads-list .horse-ad-card:hover {
    box-shadow: 0 6px 20px rgba(0, 43, 71, 0.1);
    transform: translateY(-3px);
}

.horse-ads-list .card-img-top-wrapper {
    background-color: #f5f7fa;
}

.horse-ads-list .card-title {
    font-weight: 700;
    color: #002B47;
    font-size: 1.05rem;
}

.horse-ads-list .card-text .text-muted {
    color: #6c757d !important;
}

.horse-ads-list .btn-outline-primary {
    color: #0081D5;
    border-color: #0081D5;
    border-radius: 0;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
}

.horse-ads-list .btn-outline-primary:hover {
    background-color: #0081D5;
    border-color: #0081D5;
    color: #fff;
}

/* ==========================================================================
   Single Ad Detail
   ========================================================================== */

.horse-specs .table {
    border-radius: 0;
}

.horse-specs .table th {
    background-color: #f5f7fa;
    color: #002B47;
    font-weight: 600;
    width: 40%;
    font-size: 0.9rem;
    border-color: #dde2e8;
}

.horse-specs .table td {
    font-size: 0.9rem;
    border-color: #dde2e8;
}

.horse-description h3,
.horse-specs h3 {
    color: #002B47;
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.horse-description h3::after,
.horse-specs h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: #0081D5;
}

/* Sidebar contact card */
.col-lg-4 .card {
    border-radius: 0;
    border: 1px solid #dde2e8;
}

.col-lg-4 .card .card-title {
    color: #002B47;
    font-weight: 700;
}

.col-lg-4 .card .price-tag .text-primary {
    color: #0081D5 !important;
}

.col-lg-4 .card .btn-primary {
    background-color: #0081D5;
    border: none;
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: background-color 0.2s ease;
}

.col-lg-4 .card .btn-primary:hover {
    background-color: #002B47;
}

.col-lg-4 .card .btn-outline-primary {
    color: #0081D5;
    border-color: #0081D5;
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
}

.col-lg-4 .card .btn-outline-primary:hover {
    background-color: #0081D5;
    border-color: #0081D5;
    color: #fff;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.horse-ads-list .page-numbers {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    margin: 0 0.15rem;
    border: 1px solid #dde2e8;
    color: #0081D5;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.horse-ads-list .page-numbers:hover {
    background-color: #0081D5;
    border-color: #0081D5;
    color: #fff;
}

.horse-ads-list .page-numbers.current {
    background-color: #002B47;
    border-color: #002B47;
    color: #fff;
}
