/* =========================
   VAPMA Member Dashboard
   My Profiles
   ========================= */

.vapma-profiles-panel {
    display: flex;
    flex-direction: column;
}

.vapma-profiles-panel h4 {
    margin: 0 0 8px;
}

.vapma-profiles-panel > p:first-of-type {
    margin: 0 0 12px;
}

.vapma-profiles-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.vapma-profiles-preview-button {
    margin: 0;
    white-space: nowrap;
}

.vapma-profiles-panel .vapma-profiles-form {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vapma-profiles-panel .vapma-profiles-toggle-row + .vapma-profiles-text-wrap,
.vapma-profiles-panel .vapma-profiles-toggle-row + .vapma-profiles-field-row,
.vapma-profiles-panel .vapma-profiles-toggle-row + .vapma-profiles-row-section {
    margin-top: -8px;
}

.vapma-profiles-panel .vapma-profiles-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    color: #f2f2f2;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 600;
    text-align: left;
}

.vapma-profiles-panel .vapma-profiles-toggle input[type="checkbox"] {
    margin: 0;
    flex: 0 0 auto;
}

.vapma-profiles-panel .vapma-profiles-toggle span {
    display: inline-block;
}

.vapma-profiles-panel .vapma-profiles-field-row {
    margin: 0;
}

.vapma-profiles-panel .vapma-profiles-field-label {
    display: block;
    margin: 0 0 6px;
    padding: 0;
    color: #f2f2f2;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
    text-align: left;
}

.vapma-profiles-panel .vapma-profiles-select {
    display: block;
    width: 100%;
    height: 40px;
    padding: 0 12px;
    background: #121212;
    border: 1px solid #2a2a2a;
    color: #ffffff;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 13px;
}

.vapma-profiles-panel .vapma-profiles-select:focus {
    border-color: #cf2e2e;
    outline: none;
    background: #121212;
    color: #ffffff;
}

.vapma-profiles-panel .vapma-profiles-text-wrap {
    margin: 0;
}

.vapma-profiles-panel .vapma-profiles-text-wrap p {
    margin: 0;
}

.vapma-profiles-panel textarea {
    display: block;
    width: 100%;
    min-height: 120px;
    padding: 10px 12px;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    background: #111;
    color: #f3f3f3;
    box-sizing: border-box;
    resize: vertical;
    line-height: 1.5;
}

.vapma-profiles-panel textarea:focus {
    border-color: #cf2e2e;
    outline: none;
    color: #f3f3f3;
    background: #111;
}

.vapma-profiles-panel textarea::placeholder {
    color: #888;
}

.vapma-profiles-panel .vapma-profile-picker-block {
    margin: 0;
}

.vapma-profile-picker-block {
    margin: 14px 0 12px;
}

.vapma-profile-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
    margin-top: 8px;
    align-content: start;
}

.vapma-profile-picker-tile {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid #242424;
    border-radius: 10px;
    background: #0f0f0f;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
}

.vapma-profile-picker-tile img,
.vapma-profile-picker-tile video {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #000;
}

.vapma-profile-picker-name {
    display: block;
    padding: 6px 7px 7px;
    font-size: 10px;
    line-height: 1.25;
    color: #cfcfcf;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vapma-profile-picker-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(0,0,0,0.78);
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
    z-index: 2;
}

.vapma-profile-picker-order {
    position: absolute;
    top: 6px;
    left: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(207,46,46,0.92);
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
    z-index: 2;
}

.vapma-profile-picker-tile.is-selected {
    border-color: #cf2e2e;
    box-shadow: inset 0 0 0 1px rgba(207,46,46,0.35);
}

.vapma-profile-picker-tile.is-selected .vapma-profile-picker-check {
    display: inline-flex;
}

.vapma-profile-picker-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
}

.vapma-profile-picker-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(2px);
}

.vapma-profile-picker-dialog {
    position: relative;
    width: min(1100px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    margin: 16px auto;
    background: #0d0d0d;
    border: 1px solid #262626;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.vapma-profile-picker-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 3;
    width: 34px;
    height: 34px;
    border: 1px solid #303030;
    border-radius: 999px;
    background: rgba(18,18,18,0.95);
    color: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.vapma-profile-picker-header {
    padding: 18px 20px 12px;
    border-bottom: 1px solid #1f1f1f;
}

.vapma-profile-picker-header h3 {
    margin: 0;
    font-size: 20px;
    line-height: 1.2;
    color: #ffffff;
}

.vapma-profile-picker-filters {
    padding: 12px 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vapma-profile-picker-body {
    padding: 16px 20px 20px;
    overflow: auto;
    min-height: 240px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    align-content: start;
}

.vapma-profile-picker-footer {
    padding: 14px 20px 18px;
    border-top: 1px solid #1f1f1f;
    display: flex;
    justify-content: flex-end;
}

.vapma-profiles-row-section {
    margin: 0;
}

.vapma-profiles-row-section-title {
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.2;
    color: #9f9f9f;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.vapma-profiles-helper-text {
    margin: 0 0 8px;
}

.vapma-profiles-helper-text-tight {
    margin-bottom: 6px;
}

/* Featured Content Card */

.vapma-profiles-featured-card {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0 0 10px;
    padding: 10px;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    background: #111;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 6px 16px rgba(0,0,0,0.35);
}

.vapma-profiles-featured-card:hover {
    transform: translateY(-2px);
    border-color: #3a3a3a;
    box-shadow: 0 10px 22px rgba(0,0,0,0.45);
}

.vapma-profiles-featured-media {
    width: 132px;
    height: 84px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    flex: 0 0 132px;
}

.vapma-profiles-featured-media img,
.vapma-profiles-featured-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

.vapma-profiles-featured-media video {
    pointer-events: none;
}

.vapma-profiles-featured-meta {
    min-width: 0;
}

.vapma-profiles-featured-label {
    font-size: 10px;
    opacity: 0.65;
    margin: 0 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.vapma-profiles-featured-title {
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.vapma-profiles-featured-sub {
    font-size: 12px;
    opacity: 0.72;
    margin-top: 4px;
}

/* Featured Row Preview */

.vapma-profiles-row-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    cursor: pointer;
}

.vapma-profiles-row-preview-item {
    width: 92px;
    transition: transform 0.15s ease;
}

.vapma-profiles-row-preview:hover .vapma-profiles-row-preview-item {
    transform: translateY(-1px);
}

.vapma-profiles-row-preview-media {
    width: 92px;
    height: 92px;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    border: 1px solid #2a2a2a;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.vapma-profiles-row-preview-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.15s ease;
    pointer-events: none;
}

.vapma-profiles-row-preview:hover .vapma-profiles-row-preview-media {
    transform: translateY(-2px);
    border-color: #3a3a3a;
    box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}

.vapma-profiles-row-preview:hover .vapma-profiles-row-preview-media::after {
    background: rgba(255,255,255,0.04);
}

.vapma-profiles-row-preview-media img,
.vapma-profiles-row-preview-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}

.vapma-profiles-row-preview-media video {
    pointer-events: none;
}

.vapma-profiles-row-preview-order {
    font-size: 12px;
    opacity: 0.72;
    margin-top: 5px;
}

.vapma-profiles-panel .button.button-secondary {
    margin-top: 0;
}

.vapma-profiles-panel .vapma-profile-picker-summary > .button.button-secondary {
    margin-top: 2px;
}

.vapma-profiles-panel .vapma-profiles-form > p:last-child {
    margin: 2px 0 0;
}

.vapma-profiles-panel .vapma-profiles-form > p:last-child .button.button-secondary {
    margin-top: 0;
}

.vapma-profiles-accent-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vapma-profiles-accent-option {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 2px;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.45;
    transition: opacity 0.15s ease, transform 0.12s ease;
}

.vapma-profiles-accent-option:hover {
    opacity: 0.75;
    transform: scale(1.05);
}

.vapma-profiles-accent-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.vapma-profiles-accent-option input[type="radio"]:checked + .vapma-profiles-accent-swatch {
    box-shadow:
        inset 0 0 0 2px rgba(0,0,0,0.45),
        0 0 0 2px rgba(255,255,255,0.18),
        0 0 10px rgba(255,255,255,0.10);
}

.vapma-profiles-accent-option:has(input[type="radio"]:checked) {
    opacity: 1;
}

.vapma-profiles-accent-swatch {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    flex: 0 0 24px;
}

.vapma-profiles-accent-swatch-default {
    background: linear-gradient(135deg, #999 0%, #444 100%);
}

.vapma-profiles-shell {
    position: relative;
    padding-top: 10px;
}

.vapma-profiles-shell > .vapma-md-row:first-of-type {
    margin-top: 0;
}

.vapma-profiles-address-card {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    gap: 10px;
    text-align: right;
    margin: 6px 0 10px;
    padding: 0 2px;
}

.vapma-profiles-address-label {
    font-size: 10px;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #7a7a7a;
    margin-bottom: 4px;
}

.vapma-profiles-address-value {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.01em;
}

.vapma-profiles-panel label.vapma-profiles-switch {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: auto;
    margin: 0;
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.vapma-profiles-switch input {
    display: none;
}

.vapma-profiles-switch-slider {
    width: 38px;
    height: 20px;
    background: #2a2a2a;
    border-radius: 999px;
    position: relative;
    transition: background 0.2s ease;
}

.vapma-profiles-switch-slider::after {
    content: '';
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
}

.vapma-profiles-switch input:checked + .vapma-profiles-switch-slider {
    background: #cf2e2e;
}

.vapma-profiles-switch input:checked + .vapma-profiles-switch-slider::after {
    transform: translateX(18px);
}

.vapma-profiles-switch-label {
    font-size: 13px;
    color: #f2f2f2;
    font-weight: 600;
}

/* =========================
   ========================= */

.vapma-member-profile-form input[type="file"] {
    color: #9a9a9a;
    font-size: 12px;
}

.vapma-member-profile-form input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 9px 14px;
    border: 1px solid #2a2a2a;
    background: #111;
    color: #f2f2f2;
    border-radius: 10px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
}

.vapma-member-profile-form input[type="file"]::file-selector-button:hover {
    border-color: #cf2e2e;
    color: #ffffff;
    background: #181818;
}