/* 컨테이너 */
.container {
    width: 50%;
    max-width: 600px;
    background-color: white;
    padding: 20px;
    margin: 40px auto;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    font-size: 13px;
}

/* 제목 스타일 */
h2 {
    text-align: center;
    color: #333;
}

.noticeBlock {
    background-color: #dcdcdc;
    border-radius: 8px;
    padding: 0 1em;
    font-size: 0.94em;
    color: #d55ea9;
    white-space: pre-wrap;  
    margin-bottom: 20px;
}

/* fieldset 스타일 */
fieldset {
    border: 2px solid #007bff;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #f8f9ff;
}

legend {
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
    padding: 0 10px;
}

/* 폼 그룹 (한 줄에 label과 input 정렬) */
.form-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 15px;
}

/* label 스타일 */
.form-group label {
    width: 30%;
    font-weight: bold;
    text-align: left;
}

/* 기본 input 스타일 */
.form-group input {
    width:calc(100% - 30% );
}

.input-with-button input {
    width:calc(100% - 30% - 135px); /* 버튼이 붙는 경우 input 크기 조정 */
    margin-right: 5px;
}


/* 기본 input 스타일 */
input {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.3s, background-color 0.3s;
}

/* readonly인 경우 스타일 적용 */
input[readonly] {
    background-color: #e9ecef;  /* 연한 회색 배경 */
    border-color: #ccc;         /* 테두리 회색 */
    color: #6c757d;             /* 글씨 색도 연하게 */
    cursor: not-allowed;        /* 마우스 커서를 'not-allowed'로 변경 */
}

/* 포커스 시에도 효과 유지 */
input[readonly]:focus {
    background-color: #e9ecef;
    border-color: #ccc;
    box-shadow: none;
}


/* 값이 없을 때 빨간색 테두리 표시 */
input:invalid {
    border-color: red;
}

/* 값이 올바르면 정상 테두리 */
input:valid {
    border-color: #ccc;
}

/* 포커스 시 입력 필드 강조 */
input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0px 0px 5px rgba(0, 123, 255, 0.5);
}


/* 버튼 스타일 */
button {
    padding: 8px 12px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    width: 130px;
}

/* 버튼 hover 효과 */
button:hover {
    background-color: #0056b3;
}

/* 등록확인, 중복확인, 우편번호 검색 버튼 */
button#checkBusiness,
button#checkUserId,
button#searchZipcode {
    background-color: #28a745;
}

button#checkBusiness:hover,
button#checkUserId:hover,
button#searchZipcode:hover {
    background-color: #218838;
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 20px;
}

/* 제출 버튼 */
button[type="submit"] {
    width: calc(100% - 130px);
    background-color: #dc3545;
    margin-right: 10px;
}

button[type="submit"]:hover {
    background-color: #c82333;
}

button#returnHome {
    width: 120px;
}


/* 아이디 중복 확인 상태 표시 */
.check-status {
    font-size: 12px;
    margin-left: 30%;
    font-weight: bold;
}

/* 사용 가능한 아이디 */
.valid {
    color: green;
}

/* 이미 사용 중이거나 오류 발생 */
.invalid {
    color: red;
}



/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        width: 90%;
    }

    .form-group {
    }

    .form-group label {
        width: 100%;
        margin-bottom: 5px;
    }

    .form-group input {
        width: 100%;
    }

    /* 모바일에서 버튼이 붙는 input 크기 조정 */
    .input-with-button {
        width: 100%;
    }

    .input-with-button input {
        width: calc(100% - 125px);
    }

    .input-with-button button {
        width: 120px;
    }

    .check-status {
        margin-left: 0;
    }
}
