

body{
    background-color: rgb(231, 232, 241);
    font-family:"ヒラギノ角ゴ ProN",'メイリオ',sans-serif;
    min-height:100vh;
    height: 100vh;
    line-height: 1.5;
    letter-spacing:1.5px;
}
*{
    box-sizing: border-box;
    margin:0;
    padding:0;
}
/* ↓ パソコン用*/

.add{
  

  position: relative;

    background-color: white;
    width:100%;
    min-height: 15%;
    padding:1rem;
    border:rgb(243, 62, 62) solid 10px ;
    border-radius: 10px;
    box-shadow: 4px 4px 8px rgba(255, 162, 174, 0.35),
    12px 12px 25px rgba(255, 162, 174, 0.641);
    margin-bottom: 20px;
}
.add form{
    display: flex;
    flex-wrap: wrap;
    justify-content:center;
    align-items: center;
    gap:10px;
}
 input{
    padding:0.4rem;
    border:none;
    outline: solid 1px rgba(110, 110, 110, 0.43);
    -webkit-appearance: none;
    appearance: none;
    background-color: white;
    color:red;
    font-size: 0.8rem;
    border-radius: 5px;
      font-weight: bold;
}

input[type='file']{
    
    color:black;
  
}

input:hover{
    outline:none;
    border: solid 3px rgb(172, 171, 171);
    border-radius: 5px;
}


 textarea{
    border: none;
    outline: solid 3px rgba(151, 182, 255, 0.697);
    border-radius:5px;
    resize:none;
    padding: 10px;
    transition: all 0.2s;
   
}
.edit textarea[name='event']{
    margin-top: 10px;
}
textarea:hover{
    outline:none;
    border: solid 3px rgb(172, 171, 171);
    box-shadow: 0 0 10px rgb(181, 181, 181);

}
textarea:focus{
    border: none;
    outline: none;
    box-shadow: 0 0 10px rgb(0, 101, 253);
 
}
.button_add{
    cursor:pointer;
   
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 5px;
    padding: 8px 15px; 
    background-color: rgb(55, 115, 255);
    color: white;
  
}
.button_add:hover{
    background-color: rgb(40, 86, 193);
}

.time select{
    padding: 3px;
    margin: 3px;
    border: none;
    outline:none;
    appearance: none;  /* 矢印を非表示 */
    background: transparent;
    cursor: pointer;
  
    background-color:  rgba(163, 164, 180, 0.225);
    font-size: 1rem;
    border-radius: 5px;
}
.time select:hover{
    background-color: rgba(0, 0, 0, 0.186);
}

div.edit-date {
    display: flex;
    white-space: nowrap;
    flex-wrap: nowrap;
    
 margin-bottom: 3px;
  
 
}
div.time{
    display: inline-block;
    width: auto;
    background-color: rgba(139, 143, 161, 0.136);
    border-radius: 7px;
    padding: 3px;
   margin-right: 5px;
}
.search form{
    display: flex;
    flex-wrap: wrap;
    justify-content:center;
    align-items: center;

    border:solid 4px rgba(0, 102, 255, 0.368);
    border-radius: 10px;
    margin: 10px auto; /*上下10px*/
    padding: 10px;
    width: fit-content; /* ←横幅が中身サイズになる */

} 
.button_search{
    cursor:pointer;
   
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: 5px;
    padding: 8px 15px; 
    background-color: rgb(55, 115, 255);
    color: white;
    border-radius: 5px;
}
.button_search:hover{
    background-color: rgb(40, 86, 193);
}

.reset{
   
   position: absolute;
   left: 12px;
   bottom: 12px;
    cursor:pointer;
    font-size: 10px;
    font-weight: 500;
    border: none;
    border-radius: 5px;
    padding: 4px 7.5px; 
    background-color: rgba(212, 212, 212, 0.681);
    color: rgba(29, 29, 29, 0.682);
    box-shadow: 0 0 3px rgb(141, 141, 141);

}
.reset:hover{
    background-color: rgba(142, 142, 142, 0.526);    
}



.container{
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    margin: 15px;
}
.card{
    width:300px;
    min-height: 305px;
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 15px;
    transition: all 0.2s;
    word-break: break-all;
    display: flex;
    flex-direction: column;
   
}


.card:hover{
    box-shadow:  0 2px 4px rgba(0,0,0,0.1),
                 0 8px 20px rgba(0,0,0,0.1);
}
.card form{
    display:block;
}
.card img{
    width: 100%;
    border-radius: 4px;
    margin: 8px 0;
    object-fit: contain;
    height: 150px;
}
.edit input[type='file']{
    width:100%;
    margin-bottom: 10px;
}
.edit textarea{
    width: 100%;
    margin-top: 5px;
    margin-bottom: 5px;
}
.edit input[type='password']{
    width:100%;
    margin-top: 5px;
    margin-bottom: 5px;
}
.button{
    display: flex;
    gap: 10px;
    margin-top: 3px;
    margin-bottom: 10px;    
}
.button .cancel{
    width: 50%;
    border: solid 1px  rgba(110, 110, 110, 0.71);
    border-radius: 5px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    color:rgba(9, 9, 9, 0.908);
}
.button .cancel:hover{
    background-color: rgba(0, 0, 0, 0.186);
}
.button .save{
    width: 50%;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    font-weight: 500;
    padding: 7px; 
    background-color: rgb(76, 130, 255);
    color: white;
}
.button .save:hover{
    background-color: rgb(48, 81, 157);
}
.delete button{
    width: 100%;
    border: none;
    border-radius: 5px;
    color: red;
    background-color: white;
    outline: solid 1px rgba(255, 0, 0, 0.651);
    padding: 5px;
    font-weight: bold;
}
.delete button:hover{
    background-color: rgb(255, 94, 94);
    color: white;
}
.view{
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.edit_button{
    width: 25%;
    font-size: 15px;
    font-weight: 400;
    padding: 4px; 
    border: none;
    border-radius: 5px;
    color:  rgb(76, 130, 255);
    outline: solid 1px rgb(114, 156, 255);
    background-color: white;
    margin-top: auto;

}
.edit_button:hover{ 
    background-color:rgb(76, 130, 255) ;
    color: white;

}

.edit{
    display: none;
}
/* ↓スマホ用（上書き）*/

@media  screen and (max-width:768px) {
    .add form{
        justify-content:center;
        align-items: center;
    }
    .container {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        margin: 10px;
    }
    
    .card {
        width: calc(50% - 16px); /*margin分引く */
        min-height: 200px;
        margin: 8px;
        padding: 12px;
    }
    .add {
        padding: 0.8rem;
        border-width: 6px;
    }

    .add form {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .add form textarea,
    .add form input[type='file'] {
        width: 100%;
    }

    .button_add {
        width: 100%;
        padding: 10px;
        font-size: 16px;
    }

    div.time {
        margin-bottom:5px ;
       
        margin-right: 1px;
    }

    .time select {
        font-size: 0.85rem;
        padding: 2px;
        margin: 1px;
    }

    .edit_button {
        width: 30%;
        padding: 6px;
    }

    .button .cancel,
    .button .save {
        font-size: 14px;
        padding: 8px;
    }

    .card img {
        height: 200px;
    }
    div.edit-date {
        display: flex;
        white-space: normal;
        flex-wrap: wrap;
        font-size: 10px;
        margin-bottom: 3px;
    }
    .date{
        font-size: 17px;
    }
    div.time{
        display: inline-block;
        width: auto;
        background-color: rgba(154, 154, 154, 0.136);
        border-radius: 7px;
        padding: 3px;
       margin-right: 5px;
    }
    

}   

