.wcup-upload-field {
    margin: 0 0 24px;
}

.wcup-upload-field.is-hidden,
.wcup-upload-field:not(.wcup-is-ready) {
    display: none;
}

.wcup-upload-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
    color: #262626;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 20px;
}

.wcup-upload-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #ddd;
}

.wcup-upload-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 28px;
    justify-content: space-between;
}

.wcup-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.wcup-upload-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 64px;
    padding: 18px 38px;
    border: 0;
    border-radius: 999px;
    background: #111 !important;
    color: #fff !important;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    opacity: 1 !important;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex: 0 0 auto;
}

.wcup-upload-button:hover,
.wcup-upload-button:focus {
    background: #000 !important;
    color: #fff !important;
    opacity: 1 !important;
    transform: translateY(-1px);
}

.wcup-upload-button,
.wcup-upload-button * {
    color: #fff !important;
    opacity: 1 !important;
}

.wcup-upload-button svg {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
}

.wcup-upload-button path {
    fill: currentColor !important;
}

.wcup-existing-file-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 0 0 auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: #111 !important;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none !important;
    box-shadow: none !important;
    appearance: none;
    opacity: 1 !important;
    cursor: pointer;
}

.wcup-existing-file-toggle span {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.wcup-existing-file-toggle:hover,
.wcup-existing-file-toggle:focus {
    color: #000 !important;
    background: transparent !important;
}

.wcup-existing-file-toggle::after {
    content: "→";
    font-size: 28px;
    line-height: 1;
    text-decoration: none;
}

.wcup-existing-file-select {
    display: none;
    width: 100%;
    max-width: 420px;
    margin-top: 16px;
}

.wcup-existing-file-select.is-visible {
    display: block;
}

.wcup-existing-file-select select {
    width: 100%;
}

.wcup-file-help,
.wcup-selected-file-name {
    display: block;
    margin-top: 14px;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.wcup-selected-file-name:empty {
    display: none;
}

@media (max-width: 640px) {
    .wcup-upload-actions {
        gap: 16px;
    }

    .wcup-upload-button,
    .wcup-existing-file-toggle {
        font-size: 16px;
    }

    .wcup-upload-button {
        width: 100%;
        padding: 16px 24px;
    }
}

@media (max-width: 767px) {
    .wcup-upload-actions {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .wcup-existing-file-toggle {
        margin-left: 0 !important;
    }
}

.wcup-account-files-title {
    margin: 0 0 28px;
    color: #111827;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
}

.wcup-account-files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 36px 48px;
}

.wcup-account-file-card {
    min-width: 0;
    overflow: hidden;
}

.wcup-account-file-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    margin-bottom: 14px;
    overflow: hidden;
    border-radius: 14px;
    background: #f7f7f7;
}

.wcup-account-file-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wcup-account-file-icon {
    flex-direction: column;
    gap: 10px;
    color: #6b7280;
}

.wcup-account-file-icon.is-pdf {
    color: #d71920;
}

.wcup-account-file-icon svg {
    width: 72px;
    height: 72px;
}

.wcup-account-file-icon span {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.wcup-account-file-body {
    min-width: 0;
}

.wcup-account-file-title {
    margin: 0 0 6px;
    color: #262626;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.wcup-account-file-meta {
    margin-bottom: 12px;
    color: #5f5f5f;
    font-size: 15px;
    line-height: 1.35;
}

.wcup-account-file-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.wcup-account-file-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 20px;
    border: 2px solid #262626;
    border-radius: 999px;
    color: #262626 !important;
    background: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
}

.wcup-account-file-view:hover,
.wcup-account-file-view:focus {
    color: #fff !important;
    border-color: #C91A22;
    background-color: #C91A22;
}

.wcup-account-file-delete-form {
    margin: 0;
}

.wcup-account-file-delete {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    min-height: 48px;
    padding: 8px 20px;
    border: 0;
    border-radius: 16px;
    color: #fff !important;
    background-color: #C91A22 !important;
    cursor: pointer;
}

.wcup-account-file-delete:hover,
.wcup-account-file-delete:focus {
    background-color: #b91218 !important;
}

.wcup-account-file-delete.is-disabled,
.wcup-account-file-delete.is-disabled:hover,
.wcup-account-file-delete.is-disabled:focus {
    border-color: #d1d5db !important;
    background-color: #d1d5db !important;
    color: #6b7280 !important;
    cursor: not-allowed;
}

.wcup-account-file-delete svg {
    width: 24px;
    height: 24px;
}

.wcup-lightbox-is-open {
    overflow: hidden;
}

.wcup-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.wcup-lightbox.is-open {
    display: flex;
}

.wcup-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.wcup-lightbox__dialog {
    position: relative;
    z-index: 1;
    width: min(960px, 100%);
    max-height: calc(100vh - 48px);
    padding: 20px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.wcup-lightbox__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    color: #fff !important;
    background: #C91A22 !important;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.wcup-lightbox__image {
    display: block;
    width: 100%;
    max-height: calc(100vh - 150px);
    object-fit: contain;
    border-radius: 12px;
}

.wcup-lightbox__title {
    margin-top: 12px;
    color: #262626;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    overflow-wrap: anywhere;
}
