/* Material Design 3のコンポーネントのCSSを読み込む */
@import url('https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css');

@import url('https://pp-various.pages.dev/data/fonts/googlesans.css');

@import url('https://pp-various.pages.dev/data/fonts/ndot.css');

body {
    font-family: "Noto Sans JP", "Roboto", sans-serif;
    margin: 0;
    padding: 24px;
    background-color: #f5f5f5;
}

.mdc-typography--headline4 {
    font-family: "Noto Sans JP", "Roboto", sans-serif;
}

.mdc-button__label {
    font-family: "Noto Sans JP", "Roboto", sans-serif;
}

.mdc-typography--body2 {
    font-family: "Noto Sans JP", "Roboto", sans-serif;
}

.mdc-form-field {
    font-family: "Noto Sans JP", "Roboto", sans-serif;
}

.mdc-typography--subtitle1 {
    font-family: "Noto Sans JP", "Roboto", sans-serif;
}


.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 32px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

.input-group {
    margin-bottom: 24px;
    width: 100%;
}

.mdc-text-field {
    width: 100%;
}

.mdc-text-field:not(:disabled) {
    --mdc-text-field-idle-border-color: rgba(0, 0, 0, 0.38);
    --mdc-text-field-hover-border-color: rgba(0, 0, 0, 0.87);
    --mdc-text-field-focused-border-color: #388bff;
}

/* ラベルの位置を調整 */
.mdc-text-field .mdc-floating-label {
    left: 20px;
}

.image-preview-container {
    width: 500px;
    height: 300px;
    margin-bottom: 24px;
    border: 2px dashed rgba(0, 0, 0, 0.38);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-preview {
    max-width: 100%;
    max-height: 100%;
    border-radius: 6px;
    display: block;
    /* 余白をリセット */
}

.preview-placeholder {
    text-align: center;
}

.preview-icon {
    font-size: 48px;
    color: rgba(0, 0, 0, 0.38);
}

#downloadButton {
    --mdc-theme-primary: #388bff;
    --mdc-shape-small: 12px;
}

.mdc-button {
    text-transform: none;
    font-weight: 500;
    --mdc-theme-primary: #388bff;
}


#file-label {
    margin-top: 8px;
    font-family: "Noto Sans JP", "Roboto", sans-serif;
}

/* ファイル選択ボタンをカスタマイズ */
.input-group .mdc-button {
    --mdc-shape-small: 8px;
}

/* ラジオボタンのスタイル */
.mdc-form-field {
    display: inline-flex;
    /* inline-flex を使用して横並びを維持 */
    margin-right: 16px;
}

.mdc-form-field label {
    margin-left: 8px;
    /* ラベルとラジオボタンの間隔 */
    vertical-align: middle;
    /* ラベルを垂直方向に中央揃え */
}

/* 色と透明度の入力欄を横並びにする */
.color-opacity-group {
    display: flex;
    justify-content: space-around;
    /* 要素間に均等なスペースを配置 */
    align-items: center;
    /* 垂直方向に中央揃え */
}

.color-opacity-group>div {
    flex: 1;
    /* 各要素に均等な幅を割り当てる */
    margin: 0 10px;
    /* 要素間にマージンを追加 */
}

/* カラーピッカーを無地にする */
.color-picker-container {
    width: 100px;
    height: 50px;
    /* 高さを50pxに変更 */
    border: 1px solid rgba(0, 0, 0, 0.38);
    border-radius: 4px;
    overflow: hidden;
}

.color-picker-container input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 100%;
    /* 高さを100%に変更 */
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-family: "Noto Sans JP", "Roboto", sans-serif;
}

/* 透明度の入力欄を無地にする */
.opacity-slider-container {
    width: 100px;
}

.opacity-slider-container .mdc-text-field__input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 36px;
    /* 高さを36pxに変更 */
    border: 1px solid rgba(0, 0, 0, 0.38);
    border-radius: 4px;
    padding: 6px 12px;
    text-align: center;
    font-family: "Noto Sans JP", "Roboto", sans-serif;
}

/* フォント選択とフォントサイズを横並びにする */
.font-selection-group {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.font-selection-group>div {
    flex: 1;
    margin: 0 10px;
}

/* フォントサイズ入力欄のスタイル */
.font-size-container {
    width: 80px;
    /* フォントサイズ入力欄の幅を調整 */
}

.font-size-container .mdc-text-field__input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    height: 36px;
    border: 1px solid rgba(0, 0, 0, 0.38);
    border-radius: 4px;
    padding: 6px 12px;
    text-align: center;
}

/* フォント選択ボックスのスタイル */
#fontSelect {
    width: 200px;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.38);
    border-radius: 4px;
    font-family: 'Noto Sans JP', sans-serif;
}



@media (max-width: 600px) {

    /* スマートフォン用のスタイル */
    .container {
        padding: 16px;
        /* パディングを小さく */
    }

    /* 色と透明度の入力欄を縦並びにする */
    .color-opacity-group {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        /* 左寄せ */
    }

    /* フォント選択とフォントサイズを縦並びにする */
    .font-selection-group {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        /* 左寄せ */
    }

    .mdc-form-field {
        margin-right: 0;
        /* ラジオボタンの間隔を調整 */
        margin-bottom: 8px;
    }

    /* その他必要なスタイル調整 */
    .image-preview-container {
        width: 100%;
        /* 幅を100%にする */
        max-width: 500px;
        /* 最大幅を500pxに制限 */
        height: 300px;
        margin-bottom: 24px;
        border: 2px dashed rgba(0, 0, 0, 0.38);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }
}