/* ========================================
   プロフィール編集ダイアログ
   ======================================== */
.profile-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 710px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 64px);
    padding: 0;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    border-radius: 14px;
}

.profile-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.68);
}

.profile-dialog__inner {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 64px);
}

.profile-dialog__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px 10px;
    flex-shrink: 0;
    position: relative;
}

.profile-dialog__title {
    font-size: 20px;
    font-weight: 600;
    color: var(--fontcolor);
    margin: 0;
}

.profile-dialog__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--fontgray);
    position: absolute;
    top: 8px;
    right: 8px;
}

.profile-dialog__close:hover {
    color: #444;
}

.profile-dialog__close-icon {
    width: 16px;
    height: 16px;
    position: relative;
}

.profile-dialog__close-icon::before,
.profile-dialog__close-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: currentColor;
}

.profile-dialog__close-icon::before {
    transform: rotate(45deg);
}

.profile-dialog__close-icon::after {
    transform: rotate(-45deg);
}

.profile-dialog__body {
    padding: 12px 40px;
    overflow-y: auto;
    flex: 1;
}

.profile-dialog__form,
.profile-dialog__field-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-dialog__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-dialog__label {
    font-size: 15px;
    font-weight: 600;
    color: var(--fontgray);
}

.profile-dialog__label--required::after {
    content: ' *';
    color: #dc2626;
}

.profile-dialog__date-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-dialog__date-label {
    font-size: 17px;
    color: #000;
}

.profile-dialog__radio-group {
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-dialog__radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: #000;
    cursor: pointer;
}

.profile-dialog__radio-input {
    width: 16px;
    height: 16px;
    accent-color: #000;
    cursor: pointer;
}

.profile-dialog__radio-group--disabled {
    opacity: 0.6;
}

.profile-dialog__input--readonly {
    background-color: #eeeeee;
    color: var(--fontgray);
    cursor: not-allowed;
}

.profile-dialog__footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 0 12px;
    flex-shrink: 0;
}

/* セクション区切り */
.profile-dialog__section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    margin-top: 4px;
}

/* ラジオボタン共通 */
.profile-dialog__radio input[type="radio"] {
    margin: 0;
    accent-color: #000;
}

/* ラジオボタングループ */
.profile-dialog__radio-group {
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-dialog__radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 15px;
    color: #444;
}

.profile-dialog__radio input[type="radio"] {
    width: 18px;
    height: 18px;
}

/* 住所グループ */
.profile-dialog__address-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-dialog__section:first-child {
    padding-top: 0;
    border-top: none;
    margin-top: 0;
}

.profile-dialog__section-title {
    font-size: 17px;
    font-weight: 600;
    color: #444;
    margin: 0;
}

.profile-dialog__section-desc {
    font-size: 13px;
    color: var(--fontgray);
    margin-top: -12px;
    margin-bottom: 0;
    line-height: 1.6;
}

/* 横並びフィールド（ラベル左、入力右） */
.profile-dialog__field--horizontal {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
}

.profile-dialog__label--fixed {
    width: 80px;
    flex-shrink: 0;
    padding-top: 10px;
}

.profile-dialog__field-input {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* フッター - 両端配置 */
.profile-dialog__footer--space-between,
.profile-dialog__footer--between {
    justify-content: space-between;
}

.profile-dialog__footer-buttons {
    display: flex;
    gap: 12px;
}

.profile-dialog__footer-right {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

/* 削除ボタン */
.profile-dialog__delete-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--fontgray);
    cursor: pointer;
    padding: 8px 0;
    font-size: 14px;
    transition: color 0.2s;
}

.profile-dialog__delete-btn:hover {
    color: #dc2626;
}

/* ========================================
   ポートフォリオ編集ダイアログ
   ======================================== */

/* 画像アップロードエリア */
.portfolio-upload-area {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 2px dashed #817f7f6e;
    border-radius: 6px;
    background-color: #ffffff;
    cursor: pointer;
    overflow: hidden;
}

.portfolio-upload-area__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--fontgray);
}

.portfolio-upload-area__placeholder svg {
    color: #aaa;
}

.portfolio-upload-area__text {
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

.portfolio-upload-area__hint {
    font-size: 12px;
    color: var(--fontgray);
}

.portfolio-upload-area__note {
    font-size: 12px;
    color: var(--fontgray);
    line-height: 1.5;
}

.portfolio-upload-area__preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-upload-area.is-dragover {
    border-color: #000;
    background-color: #f0f0f0;
}

/* チェックボックス */
.profile-dialog__checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.profile-dialog__checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
}

.profile-dialog__checkbox span {
    font-size: 14px;
    color: #444;
}

/* ========================================
   ポートフォリオ選択ダイアログ
   ======================================== */
.portfolio-select-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.portfolio-select-item {
    position: relative;
    aspect-ratio: 150 / 94;
    background-color: #efefef;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}

.portfolio-select-item:hover {
    box-shadow: 0 0 0 2px #000;
    transform: scale(1.02);
}

.portfolio-select-item__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-select-item__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
}

.portfolio-select-item__placeholder i {
    font-size: 24px;
}

.portfolio-select-loading,
.portfolio-select-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    font-size: 14px;
    color: var(--fontgray);
}

.portfolio-select-pagination {
    display: flex;
    justify-content: center;
    padding-top: 24px;
}

/* ========================================
   デザイナー種別チェックボックスグループ
   ======================================== */
.profile-dialog__checkbox-group {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    background-color: #ffffff;
}

.profile-dialog__checkbox-group.is-invalid {
    box-shadow: 0 0 0 1px rgb(239, 68, 68);
}

/* ========================================
   確認ダイアログ
   ======================================== */
.profile-dialog--confirm {
    width: 400px;
}

.profile-dialog__inner--confirm {
    padding: 0;
}

.profile-dialog__body--confirm {
    padding: 32px;
    text-align: left;
}

.profile-dialog__confirm-message {
    font-size: 15px;
    color: #444;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

.profile-dialog__footer--confirm {
    padding: 0;
    justify-content: center;
}

/* ========================================
   レスポンシブ対応（ダイアログ関連）
   ======================================== */
@media (max-width: 768px) {
    .profile-dialog {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        transform: none;
        border-radius: 0;
    }

    .profile-dialog__inner {
        height: 100%;
        max-height: none;
    }

    .profile-dialog__header {
        padding: 20px;
    }

    .profile-dialog__body {
        padding: 0 20px 20px;
    }

    .profile-dialog__footer {
        padding: 20px;
    }

    .profile-dialog__field--horizontal {
        flex-direction: column;
    }

    .profile-dialog__label--fixed {
        width: auto;
        padding-top: 0;
    }

    .profile-dialog__footer--space-between {
        flex-direction: column;
        gap: 16px;
    }

    .profile-dialog__delete-btn {
        order: 2;
        justify-content: center;
    }

    .profile-dialog__footer-buttons {
        order: 1;
        justify-content: flex-end;
    }

    .portfolio-select-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* 確認ダイアログはモバイルでも小さく */
    .profile-dialog--confirm {
        width: calc(100vw - 32px);
        height: auto;
        max-width: 400px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .profile-dialog__inner--confirm {
        height: auto;
    }
}
