/*
 * ALW Listings Plugin Stylesheet
 * Styled to match Vidalist.org brand palette
 */

/* --- CSS Variable Definitions --- */
:root {
    --alw-body-font:           'Nunito', 'Poppins', sans-serif;
    --alw-display-font:        'Playfair Display', Georgia, serif;
    --alw-terracotta:          #c9563a;
    --alw-terracotta-light:    #e07055;
    --alw-night:               #1d2d44;
    --alw-sand:                #f2ead8;
    --alw-cream:               #faf7f0;
    --alw-adobe:               #b5784a;
    --alw-sky:                 #3a7db5;
    --alw-premium-border-color:#c9563a;
    --alw-basic-border-color:  #e8dfd0;
    --alw-button-bg:           #c9563a;
    --alw-button-hover-bg:     #e07055;
    --alw-text-color:          #2b2b2b;
    --alw-title-color:         #1d2d44;
}

/* --- Base --- */
* { box-sizing: border-box; }

/* --- Premium Upsell Notice (basic form) --- */
.alw-upsell-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fffbea;
    border: 1px solid #f0d060;
    border-left: 4px solid #d4a017;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 0.9em;
}
.alw-upsell-icon { font-size: 1.2em; flex-shrink: 0; }
.alw-upsell-text a {
    color: var(--alw-terracotta);
    font-weight: 700;
    text-decoration: underline;
}
.alw-upsell-text a:hover { color: var(--alw-terracotta-light); }

/* --- Form Layout --- */
.container { max-width: 960px; margin-left: auto; margin-right: auto; padding: 0 15px; }
.row { display: flex; flex-wrap: wrap; margin-left: -15px; margin-right: -15px; }
[class*="col-"] { padding-left: 15px; padding-right: 15px; }
@media (min-width: 992px) { .col-lg-5 { width: 41.66666667%; } .col-lg-1 { width: 8.33333333%; } }
@media (min-width: 768px) and (max-width: 991px) { .col-md-5 { width: 41.66666667%; } .col-md-1 { width: 8.33333333%; } }
@media (max-width: 767px) {
    .col-sm-12, .col-12, .col-lg-5, .col-md-5, .col-lg-1, .col-md-1 { width: 100%; }
    .input-add-on { top: 45px; }
}
.col-md-12, .col-md-6 { width: 100%; }
@media (min-width: 768px) { .col-md-6 { width: 50%; } }

/* --- Section Card --- */
.group {
    border: 1px solid var(--alw-basic-border-color);
    border-radius: 12px;
    padding: 24px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    background-color: #fff;
}

/* --- Section Heading --- */
.form-heading {
    font-family: var(--alw-display-font);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: left;
    background: var(--alw-sand);
    padding: 10px 14px;
    margin-bottom: 20px;
    border-radius: 8px;
    color: var(--alw-night);
    border-left: 4px solid var(--alw-terracotta);
}

/* --- Form Fields --- */
.form-group { margin-bottom: 18px; position: relative; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    color: #444;
}
.form-group .description {
    font-size: 0.8rem;
    color: #888;
    margin: -12px 0 12px;
}
.red-asterisk { color: var(--alw-terracotta); }

.form-control {
    width: 100%;
    padding: 10px 40px 10px 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: var(--alw-body-font);
    color: var(--alw-text-color);
    background: #fff;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.07);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    border-color: var(--alw-terracotta);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(201, 86, 58, 0.15);
}
textarea.form-control { padding-right: 14px; resize: vertical; }

.input-add-on {
    position: absolute;
    right: 13px;
    top: 50px;
    transform: translateY(-50%);
    color: #aaa;
    font-size: 1em;
    cursor: pointer;
    pointer-events: none;
}

/* --- State/City/Zip row --- */
.alw-location-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) { .alw-location-row { grid-template-columns: 1fr; } }

/* --- Category Options --- */
.alw-category-selection { margin-top: 8px; }
.alw-category-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.alw-category-option {
    background: var(--alw-cream);
    border: 2px solid var(--alw-basic-border-color);
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.alw-category-option:hover { border-color: var(--alw-terracotta); background: #fff6f3; }
.alw-category-option label {
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--alw-night);
}
.alw-category-option input[type="radio"],
.alw-category-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--alw-terracotta);
    flex-shrink: 0;
}

/* --- Terms / Agree --- */
.agree-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.agree-container input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: var(--alw-terracotta);
}
.agree-container a { color: var(--alw-terracotta); font-weight: 600; }

/* --- Submit Button --- */
/* Use high-specificity selector to override any theme .btn styles */
button.btn.btn-info,
button.btn-info,
.btn.btn-info {
    background-color: #c9563a !important;
    color: #ffffff !important;
    border: none !important;
    padding: 14px 32px;
    border-radius: 50px;
    cursor: pointer;
    display: inline-block;
    min-width: 260px;
    text-align: center;
    font-family: var(--alw-body-font);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 3px 10px rgba(201, 86, 58, 0.3);
    opacity: 1 !important;
}
button.btn.btn-info:hover,
button.btn-info:hover,
.btn.btn-info:hover {
    background-color: #e07055 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}
button.btn.btn-info:active,
.btn.btn-info:active { transform: translateY(0); }

/* --- Hours of Operation --- */
.alw-hours-grid {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 8px 12px;
    align-items: center;
}
.alw-hours-grid label {
    font-weight: 600;
    font-size: 0.88rem;
    color: #555;
    margin: 0;
}

/* --- Gallery Upload --- */
#alw-upload-gallery-button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--alw-night);
    color: #fff !important;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}
#alw-upload-gallery-button:hover { background: var(--alw-sky); }
#alw-gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}
#alw-gallery-container img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--alw-basic-border-color);
}

/* ===================================================================
   LISTING DISPLAY — Archive Cards
   =================================================================== */
.alw-category-listings-container { width: 100%; margin-top: 10px; }

.alw-listing-item { text-align: left; }

.alw-listing-item.alw-listing-type-basic {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--alw-basic-border-color);
    font-size: 14px;
    color: var(--alw-text-color);
}

.alw-listing-item.alw-listing-type-premium {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--alw-basic-border-color);
    font-size: 14px;
    color: var(--alw-title-color);
}

.alw-listing-image-column { flex: 0 0 120px; height: 120px; }
.alw-listing-image { width: 100%; height: 100%; background-size: cover; background-position: center; border-radius: 8px; }
.alw-listing-details-column { flex: 1; min-width: 0; }

.alw-listing-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px;
    margin-bottom: 6px;
}
.alw-listing-header-left { flex: 1; min-width: 0; }

.alw-listing-title { margin: 0 0 2px 0; font-size: 1em; font-weight: 700; text-transform: uppercase; color: var(--alw-title-color); }
.alw-listing-title a { color: inherit; text-decoration: none; transition: color 0.2s; }
.alw-listing-title a:hover { color: var(--alw-terracotta); }
.alw-listing-slogan { margin: 0 0 2px 0; font-size: 0.85em; font-weight: 600; color: #555; font-style: italic; }
.alw-listing-category { display: block; font-size: 0.72em; font-weight: 600; color: #777; text-transform: uppercase; margin: 0; }
.alw-listing-category a { color: var(--alw-sky); text-decoration: none; }
.alw-listing-category a:hover { text-decoration: underline; }
.alw-listing-description { font-size: 0.88em; line-height: 1.45; margin: 4px 0 0; color: #555; overflow-wrap: break-word; }
.alw-listing-description p { margin: 0; }

/* View More button */
.alw-learn-more-button.alw-learn-more-inline {
    display: inline-block !important;
    flex-shrink: 0;
    padding: 6px 16px;
    border-radius: 50px;
    background: var(--alw-terracotta);
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
}
.alw-learn-more-button.alw-learn-more-inline:hover {
    background: var(--alw-terracotta-light);
    color: #fff !important;
    transform: translateY(-1px);
}
.alw-learn-more-button:not(.alw-learn-more-inline) {
    display: inline-block;
    padding: 14px 33px;
    margin: 10px 0;
    border-radius: 50px;
    background: var(--alw-terracotta);
    color: #fff !important;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    transition: all .3s;
}
.alw-learn-more-button:not(.alw-learn-more-inline):hover {
    background: var(--alw-terracotta-light);
    color: #fff !important;
    transform: translateY(-1px);
}

@media (max-width: 600px) {
    .alw-listing-item.alw-listing-type-premium { flex-direction: column; }
    .alw-listing-image-column { width: 100%; flex-basis: 180px; }
}

/* ===================================================================
   SINGLE LISTING — Premium
   =================================================================== */
.alw-single-listing-premium { padding: 20px; border: 1px solid #eee; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border-radius: 10px; }
.alw-single-header { display: flex; gap: 20px; align-items: flex-start; padding-bottom: 20px; border-bottom: 1px solid #eee; margin-bottom: 20px; }
.alw-header-logo { flex: 0 0 200px; }
.alw-header-logo img { max-width: 100%; height: auto; border: 1px solid #ddd; border-radius: 6px; }
.alw-header-details { flex: 1; }
.alw-header-details .entry-title { margin-top: 0; font-family: var(--alw-display-font); color: var(--alw-terracotta); }
.alw-slogan { font-size: 1.05em; font-style: italic; color: #555; margin: 0 0 15px; }
.alw-single-address { color: #555; margin-bottom: 20px; }

.alw-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin-bottom: 25px; text-align: center; }
.alw-contact-item a { display: block; text-decoration: none; color: var(--alw-text-color); padding: 12px; border: 1px solid #eee; border-radius: 8px; transition: background 0.2s; }
.alw-contact-item a:hover { background: #f5f5f5; }
.alw-contact-item .dashicons { font-size: 1.8em; width: auto; height: auto; color: var(--alw-terracotta); display: block; margin: 0 auto 6px; }
.alw-contact-item label { display: block; font-size: 0.9em; line-height: 1.3; cursor: pointer; }

.alw-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.alw-section-title { font-size: 1.1em; font-weight: 700; margin-bottom: 15px; padding-bottom: 8px; border-bottom: 2px solid var(--alw-sand); color: var(--alw-night); }
.alw-hours-section, .alw-map-section { min-width: 0; }
.alw-map-section iframe { border-radius: 8px; }

.alw-hours-table { width: 100%; border-collapse: collapse; }
.alw-hours-table td { padding: 8px; border-bottom: 1px solid #f0f0f0; font-size: 0.9em; }
.alw-hours-table .alw-day { font-weight: 600; }
.alw-hours-table .alw-time { text-align: right; color: #555; }

.alw-gallery-section { margin-bottom: 30px; }
.alw-gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.alw-gallery-item img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid #ddd; }

.alw-single-footer { text-align: center; margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
.alw-website-button {
    display: inline-block; padding: 14px 33px; margin: 10px 0;
    border-radius: 50px; background: var(--alw-terracotta); color: #fff !important;
    font-size: 1rem; font-weight: 700; text-transform: uppercase; text-decoration: none;
    transition: all .3s;
}
.alw-website-button:hover { background: var(--alw-terracotta-light); transform: translateY(-1px); }

/* Single - Basic */
.alw-single-listing-basic { padding: 20px 0; margin-top: 20px; border-top: 1px solid #eee; }
.alw-single-listing-basic p { margin-bottom: 12px; }

@media (max-width: 768px) {
    .alw-single-header { flex-direction: column; text-align: center; }
    .alw-header-logo { margin: 0 auto 20px; }
    .alw-details-grid { grid-template-columns: 1fr; }
    .alw-contact-grid { grid-template-columns: 1fr 1fr; }
}

/* ===================================================================
   ALERTS
   =================================================================== */
.alw-alert { padding: 15px 20px; margin-bottom: 20px; border-radius: 8px; font-size: 15px; line-height: 1.5; }
.alw-alert ul { margin: 0; padding-left: 20px; }
.alw-alert-success { background-color: #ecf7ec; border: 1px solid #67b26a; color: #1a4d1a; }
.alw-alert-danger  { background-color: #fdf0ef; border: 1px solid #e8b4ae; color: #7a1f14; }

/* ===================================================================
   PAYMENT STEP
   =================================================================== */
.alw-payment-box {
    text-align: center;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 36px 28px;
    margin: 24px auto;
    max-width: 520px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.alw-payment-box h2 { margin: 0 0 12px; font-family: var(--alw-display-font); font-size: 1.5em; color: var(--alw-night); }
.alw-payment-price { font-size: 2.6em; font-weight: 900; color: var(--alw-night); margin: 0 0 4px; line-height: 1; }
.alw-payment-price span { font-size: 0.38em; font-weight: 400; color: #888; }
.alw-payment-sub { font-size: 0.88em; color: #888; margin: 0 0 24px; }
.alw-buy-button-wrap { display: flex; justify-content: center; }

/* ===================================================================
   MY LISTINGS
   =================================================================== */
.alw-all-listings-wrapper, .alw-my-listings-wrapper { margin-top: 30px; padding: 20px; background-color: var(--alw-cream); border: 1px solid #eee; border-radius: 10px; }
.alw-my-listings-wrapper h3 { margin-top: 0; font-size: 1.5em; color: var(--alw-night); }
.alw-my-listings-wrapper ul { list-style: none; padding-left: 0; }
.alw-my-listings-wrapper li { padding: 8px 0; border-bottom: 1px dashed #eee; }
.alw-my-listings-wrapper li:last-child { border-bottom: none; }
