/**
 * MemberPress Add-On — Currency Switcher Styles
 */

/* ─── Header currency dropdown (top bar) ──────────────────────── */

.d911-mc-header-wrapper {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 12px;
}

.d911-mc-hdr-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Toggle button — plain text style matching header links */
.d911-mc-hdr-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    background-color: transparent !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    cursor: pointer;
    transition: opacity 0.2s ease;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: none !important;
    outline: none !important;
}

.d911-mc-hdr-toggle:hover,
.d911-mc-hdr-toggle:focus,
.d911-mc-hdr-toggle:active {
    opacity: 0.8;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    color: #fff !important;
    box-shadow: none !important;
    outline: none !important;
}

.d911-mc-hdr-symbol {
    font-size: 14px;
    font-weight: 600;
    color: #fff !important;
}

.d911-mc-hdr-code {
    font-size: 14px;
    font-weight: 400;
    color: #fff !important;
    letter-spacing: 0.5px;
}

.d911-mc-hdr-arrow {
    font-size: 10px;
    color: #fff !important;
    opacity: 0.7;
    transition: transform 0.2s ease;
}

.d911-mc-hdr-dropdown.d911-mc-open .d911-mc-hdr-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu — opens downward */
.d911-mc-hdr-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 120px;
    background: #2c2c2c;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 99999;
    overflow: hidden;
}

.d911-mc-hdr-dropdown.d911-mc-open .d911-mc-hdr-menu {
    display: block;
}

/* Each dropdown item */
.d911-mc-hdr-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 8px 14px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: rgba(255,255,255,0.8) !important;
    font-size: 13px !important;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
    text-align: left;
    box-shadow: none !important;
}

.d911-mc-hdr-item:hover {
    background: rgba(255,255,255,0.12) !important;
    color: #fff !important;
}

.d911-mc-hdr-item.d911-mc-hdr-item-active {
    background: rgba(232, 117, 17, 0.25) !important;
    color: #fff !important;
    font-weight: 600;
}

.d911-mc-hdr-item-symbol {
    font-weight: 700;
    min-width: 14px;
    text-align: center;
}

.d911-mc-hdr-item-code {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ─── Content area button switcher ────────────────────────────── */

.d911-mc-switcher.d911-mc-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    margin-bottom: 15px;
}

.d911-mc-group-switcher {
    text-align: center;
    margin-bottom: 20px;
}

.d911-mc-group-switcher .d911-mc-switcher {
    justify-content: center;
}

/* Label */
.d911-mc-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-right: 4px;
}

/* Button style switcher */
.d911-mc-buttons .d911-mc-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
}

.d911-mc-buttons .d911-mc-btn:hover {
    border-color: #E87511;
    color: #E87511;
}

.d911-mc-buttons .d911-mc-btn.d911-mc-active {
    background: #E87511;
    border-color: #E87511;
    color: #fff;
    font-weight: 600;
}

/* ─── Dropdown style switcher ─────────────────────────────────── */

.d911-mc-dropdown-wrap .d911-mc-select {
    padding: 8px 32px 8px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    appearance: auto;
    min-width: 200px;
}

.d911-mc-dropdown-wrap .d911-mc-select:hover,
.d911-mc-dropdown-wrap .d911-mc-select:focus {
    border-color: #E87511;
    outline: none;
}

/* ─── Members area inline dropdown ────────────────────────────── */

.d911-mc-member-dropdown-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.d911-mc-member-dropdown-wrap .d911-mc-member-label {
    font-size: 13px;
    font-weight: 600;
    color: #50575e;
    white-space: nowrap;
}

.d911-mc-member-dropdown {
    position: relative;
    display: inline-block;
}

.d911-mc-member-toggle {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 7px 14px !important;
    border: 2px solid #E87511 !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: #1d2327 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    box-shadow: none !important;
}

.d911-mc-member-toggle:hover,
.d911-mc-member-toggle:focus {
    background: #fef8f3 !important;
    box-shadow: 0 0 0 2px rgba(232, 117, 17, 0.15) !important;
    outline: none !important;
}

.d911-mc-member-toggle .d911-mc-member-flag {
    font-size: 16px;
    line-height: 1;
}

.d911-mc-member-toggle .d911-mc-member-arrow {
    font-size: 10px;
    color: #8c8f94;
    transition: transform 0.2s ease;
    margin-left: 2px;
}

.d911-mc-member-dropdown.d911-mc-open .d911-mc-member-arrow {
    transform: rotate(180deg);
}

/* Dropdown menu */
.d911-mc-member-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 200px;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    z-index: 99999;
    overflow: hidden;
    padding: 4px 0;
}

.d911-mc-member-dropdown.d911-mc-open .d911-mc-member-menu {
    display: block;
}

/* Each dropdown option */
.d911-mc-member-option {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 10px 16px !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #1d2327 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    transition: background 0.15s ease !important;
    text-align: left !important;
    box-shadow: none !important;
    line-height: 1.3 !important;
}

.d911-mc-member-option:hover {
    background: #f6f7f7 !important;
}

.d911-mc-member-option.d911-mc-member-active {
    background: #fef8f3 !important;
    color: #E87511 !important;
    font-weight: 600 !important;
}

.d911-mc-member-option .d911-mc-member-opt-flag {
    font-size: 18px;
    flex-shrink: 0;
}

.d911-mc-member-option .d911-mc-member-opt-info {
    display: flex;
    flex-direction: column;
}

.d911-mc-member-option .d911-mc-member-opt-code {
    font-weight: 600;
    font-size: 14px;
}

.d911-mc-member-option .d911-mc-member-opt-name {
    font-size: 12px;
    color: #8c8f94;
    font-weight: 400;
}

.d911-mc-member-option.d911-mc-member-active .d911-mc-member-opt-name {
    color: #d06a0f;
}

.d911-mc-member-option .d911-mc-member-opt-check {
    margin-left: auto;
    color: #E87511;
    font-size: 14px;
    opacity: 0;
}

.d911-mc-member-option.d911-mc-member-active .d911-mc-member-opt-check {
    opacity: 1;
}

/* ─── Billing country field ───────────────────────────────────── */

.d911-mc-billing-country-row {
    margin-bottom: 15px;
}

.d911-mc-billing-country-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.d911-mc-billing-country-row select {
    width: 100%;
    max-width: 400px;
    padding: 8px;
}

.d911-mc-billing-country-row .required {
    color: #d63638;
}

/* ─── Invoice currency info ───────────────────────────────────── */

.d911-mc-invoice-currency td {
    padding: 8px 12px;
    background: #f0f6fc;
    border-top: 1px solid #ddd;
}

/* ─── States ──────────────────────────────────────────────────── */

.d911-mc-loading {
    opacity: 0.5;
    pointer-events: none;
}

.d911-mc-price-updating {
    transition: opacity 0.3s ease;
}

/* ─── Loading spinner ────────────────────────────────────────── */

@keyframes d911-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.d911-mc-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: d911-spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}
