/**
 * BIN Membership Frontend Styles
 *
 * @package BIN_Membership
 */

/* ===== Restricted Content ===== */
.bin-restricted-content {
    position: relative;
    margin: 2em 0;
}

.bin-restricted-content__teaser {
    position: relative;
    padding-bottom: 4em;
}

.bin-restricted-content__fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,1) 100%);
}

.bin-restricted-content__message {
    text-align: center;
    padding: 3em 2em;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: -2em;
}

.bin-restricted-content__icon {
    margin-bottom: 1em;
    color: #666;
}

.bin-restricted-content__heading {
    font-size: 1.5em;
    margin-bottom: 0.5em;
    color: #222;
}

.bin-restricted-content__text {
    font-size: 1.1em;
    margin-bottom: 1.5em;
    color: #555;
}

.bin-restricted-content__text a {
    color: #0073aa;
    text-decoration: none;
}

.bin-restricted-content__text a:hover {
    text-decoration: underline;
}

/* ===== Membership Badges ===== */
.bin-membership-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

/* New simplified badge classes */
.bin-membership-badge--registered {
    background: #e3f2fd;
    color: #1565c0;
}

.bin-membership-badge--member {
    background: #fce4ec;
    color: #c2185b;
}

/* Legacy badge classes (for backwards compatibility) */
.bin-membership-badge--none {
    background: #f5f5f5;
    color: #999;
}

.bin-membership-badge--free {
    background: #e3f2fd;
    color: #1565c0;
}

.bin-membership-badge--online,
.bin-membership-badge--individual,
.bin-membership-badge--service_provider {
    background: #fce4ec;
    color: #c2185b;
}

/* ===== Excerpt Indicator ===== */
.bin-excerpt-indicator {
    display: inline-block;
    margin-top: 0.5em;
    padding: 6px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9em;
    color: #666;
}

.bin-excerpt-indicator__icon {
    margin-right: 4px;
}

/* ===== Forms ===== */
.bin-form {
    max-width: 500px;
    margin: 2em auto;
}

.bin-form__row {
    margin-bottom: 1.5em;
}

.bin-form__row label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #333;
}

.bin-form__row input[type="text"],
.bin-form__row input[type="email"],
.bin-form__row input[type="password"],
.bin-form__row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
}

.bin-form__row input:focus,
.bin-form__row textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.bin-form__row--checkbox label {
    display: inline;
    font-weight: normal;
}

.bin-form__help {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.25em;
}

.bin-form__row .required {
    color: #dc3232;
}

.bin-form__footer {
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.bin-form__footer a {
    color: #0073aa;
    text-decoration: none;
}

.bin-form__footer a:hover {
    text-decoration: underline;
}

/* ===== Messages ===== */
.bin-message {
    padding: 1em 1.5em;
    margin: 1.5em 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.bin-message--success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.bin-message--error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.bin-message--info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

.bin-message ul {
    margin: 0.5em 0;
    padding-left: 1.5em;
}

/* ===== Account Dashboard ===== */
.bin-account-dashboard {
    max-width: 800px;
    margin: 0 auto;
}

.bin-dashboard__header h2 {
    margin-bottom: 1em;
    color: #222;
}

.bin-dashboard__section {
    margin-bottom: 3em;
}

.bin-dashboard__section h3 {
    margin-bottom: 1em;
    color: #333;
}

.bin-membership-card {
    padding: 2em;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: #fff;
}

.bin-membership-card--none {
    border-color: #e0e0e0;
}

.bin-membership-card--registered,
.bin-membership-card--free {
    border-color: #1565c0;
}

.bin-membership-card--online {
    border-color: #1976d2;
}

.bin-membership-card--individual {
    border-color: #7b1fa2;
}

.bin-membership-card--service_provider {
    border-color: #e65100;
}

.bin-membership-card__level {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 0.5em;
    color: #222;
}

.bin-membership-card__description {
    color: #666;
    margin-bottom: 1em;
}

.bin-membership-card__meta {
    font-size: 0.9em;
    color: #888;
}

.bin-membership-card__warning {
    margin-top: 1em;
    padding: 1em;
    background: #fff3cd;
    border-radius: 4px;
    border-left: 4px solid #ffc107;
}

.bin-membership-levels {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5em;
    margin-top: 1.5em;
}

.bin-membership-level {
    padding: 1.5em;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

.bin-membership-level h4 {
    margin-top: 0;
    margin-bottom: 0.5em;
    color: #222;
}

.bin-membership-level__price {
    font-size: 1.25em;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 0.75em;
}

.bin-membership-level__description {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 1em;
}

.bin-account-table {
    width: 100%;
    border-collapse: collapse;
}

.bin-account-table th,
.bin-account-table td {
    padding: 0.75em;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.bin-account-table th {
    font-weight: 600;
    width: 150px;
}

.bin-verified-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #d4edda;
    color: #28a745;
    border-radius: 12px;
    font-size: 0.85em;
    margin-left: 8px;
}

.bin-dashboard__actions {
    margin-top: 2em;
    padding-top: 2em;
    border-top: 1px solid #e0e0e0;
}

/* ===== Email Verification ===== */
.bin-verification-instructions {
    max-width: 600px;
    margin: 2em auto;
    padding: 2em;
    background: #f8f9fa;
    border-radius: 8px;
}

.bin-verification-steps ol {
    margin: 1.5em 0;
    padding-left: 1.5em;
}

.bin-verification-steps li {
    margin-bottom: 0.75em;
    color: #333;
}

.bin-help-text {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

/* ===== Membership Status Widget ===== */
.bin-membership-status {
    display: inline-block;
    padding: 0.5em 1em;
    background: #f8f9fa;
    border-radius: 4px;
}

.bin-membership-status__level {
    font-weight: 600;
    color: #222;
}

.bin-membership-status__unverified {
    color: #dc3232;
    font-size: 0.9em;
    margin-left: 0.5em;
}

/* ===== Membership Application ===== */
.bin-membership-application {
    max-width: 900px;
    margin: 0 auto;
}

/* Tier Cards */
.bin-membership-tiers {
    margin-bottom: 3em;
}

.bin-tiers-intro {
    color: #666;
    margin-bottom: 1.5em;
}

.bin-tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5em;
}

.bin-tier-card {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5em;
    background: #fff;
    transition: all 0.2s ease;
}

.bin-tier-card:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bin-tier-card--selected {
    border-color: #0073aa;
    background: #f0f6fc;
}

.bin-tier-card__header h3 {
    margin: 0 0 0.5em;
    color: #222;
}

.bin-tier-card__price {
    font-size: 1.5em;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 1em;
}

.bin-tier-card__body {
    margin-bottom: 1em;
    color: #666;
    font-size: 0.95em;
}

.bin-tier-card__footer {
    margin-top: auto;
}

.bin-tier-card--selected .bin-select-tier {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Application Form */
.bin-application-form-wrapper {
    background: #f8f9fa;
    padding: 2em;
    border-radius: 8px;
}

.bin-form__fieldset {
    border: none;
    padding: 0;
    margin: 0 0 2em;
}

.bin-form__fieldset legend {
    font-size: 1.2em;
    font-weight: 600;
    color: #222;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 1px solid #e0e0e0;
    width: 100%;
}

.bin-form__signin-prompt {
    background: #e3f2fd;
    padding: 1em;
    border-radius: 4px;
    margin-bottom: 1.5em;
    text-align: center;
}

.bin-form__signin-prompt a {
    color: #0073aa;
    font-weight: 600;
}

.bin-form__row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1em;
}

@media (max-width: 600px) {
    .bin-form__row--half {
        grid-template-columns: 1fr;
    }
}

.bin-form__submit {
    text-align: center;
    margin-top: 2em;
    padding-top: 1.5em;
    border-top: 1px solid #e0e0e0;
}

.bin-form__note {
    margin-top: 1em;
    font-size: 0.9em;
    color: #666;
}

/* Form row labels */
.bin-form__row label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 600;
    color: #333;
}

.bin-form__row .required {
    color: #dc3232;
}

/* Form inputs */
.bin-form__row input[type="text"],
.bin-form__row input[type="email"],
.bin-form__row input[type="password"],
.bin-form__row select,
.bin-form__row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1em;
    background: #fff;
}

.bin-form__row select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.bin-form__row input:focus,
.bin-form__row select:focus,
.bin-form__row textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

/* ===== Account Dropdown ===== */
.bin-account-dropdown {
    position: relative;
}

.bin-account-dropdown__trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 50px;
    transition: opacity 0.2s ease;
}

.bin-account-dropdown__trigger:hover {
    opacity: 0.8;
}

.bin-account-dropdown__avatar {
    width: 36px;
    height: 36px;
}

.bin-account-dropdown__caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #fff;
    transition: transform 0.2s ease;
}

.bin-account-dropdown.is-open .bin-account-dropdown__caret {
    transform: rotate(180deg);
}

.bin-account-dropdown__menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 220px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.bin-account-dropdown.is-open .bin-account-dropdown__menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.bin-account-dropdown__header {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
}

.bin-account-dropdown__name {
    display: block;
    font-weight: 600;
    color: #222;
    font-size: 14px;
    line-height: 1.3;
}

.bin-account-dropdown__email {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bin-account-dropdown__links {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.bin-account-dropdown__links li {
    margin: 0;
}

.bin-account-dropdown__links a {
    display: block;
    padding: 10px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s ease;
}

.bin-account-dropdown__links a:hover {
    background: #f5f5f5;
    color: #0073aa;
}

/* ===== Application Status ===== */
.bin-application-status {
    background: #fff8e1;
    border: 1px solid #ffecb3;
    border-radius: 8px;
    padding: 1.5em;
}

.bin-application-status__badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 1em;
}

.bin-application-status__badge--pending {
    background: #f0ad4e;
    color: #fff;
}

.bin-application-status__badge--approved {
    background: #5cb85c;
    color: #fff;
}

.bin-application-status__badge--rejected {
    background: #d9534f;
    color: #fff;
}

.bin-application-status__details p {
    margin: 0 0 0.5em 0;
    color: #333;
}

.bin-application-status__details p:last-child {
    margin-bottom: 0;
}

.bin-application-status__note {
    font-size: 0.95em;
    color: #666;
}
