* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html, body{
    overflow: hidden;
}
ul{
    padding: 0;
    margin: 0;
}
img{
    width: 100%;
    height: auto;
    object-fit: cover;
}
.container {
    width: 95%;
    margin: 0 auto;
}

.wrapper {
    display: flex;
    gap: 20px;                 /* space between panes */
    min-height: 100vh;
    margin: 15px 0;
}

/* Left = form panel */
.builder_pane {
    flex: 0 0 50%;
    height: 100vh;
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 6px;
    overflow-y: scroll;
}

/* Right = preview panel */
.preview_pane {
    flex: 1;                    /* take remaining space */
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    padding: 20px;
    background: #fafafa;
    height: 100vh;
    overflow: scroll;
    display: flex;
    justify-content: center;
}

/* .profile-form {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    align-items: flex-start;
    height: 100vh;
} */

.profile-form {
  padding: 20px;
  background: #fafafa;
  border-radius: 8px;
  min-height: 100vh;
}

.profile-form > .row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.profile-form .personal-info{
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
}
.photo-box {
    flex: 0 0 120px;
}

.photo-placeholder {
    width: 120px;
    height: 120px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    background: #fff;
}

.info-box {
    flex: 1;
}

.row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.field.wide {
    flex: 1 1 100%;
}

label {
    font-size: 13px;
    color: #555;
    margin-bottom: 5px;
}

input[type="text"], input[type="date"] {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
}
input[type="file"] {
    display: none;
}
.photo-placeholder {
  width: 150px;
  height: 150px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  background: #fafafa;
  transition: border-color 0.3s;
}

.photo-placeholder:hover {
  border-color: #999;
}

.photo-placeholder label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 6px;
}
.photo-placeholder .icon {
    font-size: 28px;
    cursor: pointer;
}

.job-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    border-radius: 20px;
    transition: 0.3s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}
.switch input:checked + .slider {
    -color: #2196f3;
}
.switch input:checked + .slider:before {
    transform: translateX(20px);
}

.section-box .content-field {
  flex: 1;
}

.editor {
  height: 150px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}
.btn-more-section{
    text-align: right;
}
.btn{
    padding: 8px 15px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin-right: 5px;
}
#add-section {
  background: #0078d7;
  color: #fff;
}
#add-section:hover {
  background: #005fa3;
}
.opt-section {
    display: none;
    align-items: center;
    gap: 10px;
}
.display_flex{
    display: flex;
}
.btn-loader {
    border: 3px solid #fff;
    border-top: 3px solid transparent;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

#opt-section {
    margin-left: auto;
    display:none;
    margin-bottom:10px;
}

.otp-box {
    background: #f8faff;
    border: 1px solid #d4dcef;
    padding: 20px;
    border-radius: 10px;
    max-width: 350px;
    margin-top: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.otp-label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.otp-input-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.otp-input {
    letter-spacing: 10px;
    font-size: 20px;
    font-weight: bold;
    padding: 10px 15px;
    text-align: center;
    width: 150px;
    border: 2px solid #b8c7e0;
    border-radius: 8px;
    outline: none;
    transition: 0.3s;
}

.otp-input:focus {
    border-color: #3a7afe;
    background: #eef3ff;
    box-shadow: 0 0 5px rgba(58,122,254,0.4);
}

.otp-info {
    font-size: 12px;
    color: #555;
    margin-top: 5px;
    text-align: center;
}
#btn-save{
    background: #68d700c5;
    display:none;
}
#btn-save-2{ background: #68d700c5; }
#btn-continue{
    background: #ced700c5;
}
div#sections-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
}
.section-box {
  display: flex;
  flex-direction: column;  /* stack heading and content vertically */
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
}

.section-box .heading-field,
.section-box .content-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.section-box input {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.section-box .editor {
  height: 150px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

.preview-section {
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #ddd;
    width: 650px;
    height: fit-content;
}


.profile-card {
    display: flex;
    border: 1px solid #ddd;
    background: #fff;
    overflow: hidden;
}

.profile-card .info-box {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
}

.preview-section .photo-box {
    flex: 0 0 50%; /* fixed width for photo section */
    height: 250px;
}

.preview-section .photo-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-section .info-box {
    flex: 1;
    background: #2196f3; /* blue background */
    color: white;
    padding: 20px;
}

.preview-section .info-box h2 {
    margin: 0;
    font-size: 22px;
    font-weight: bold;
}

.preview-section .info-box h4 {
    margin: 5px 0 15px;
    font-size: 16px;
    font-weight: normal;
}

.preview-section .info-box p {
    margin: 5px 0;
}

.preview-section .info-box a {
    color: white;
    text-decoration: none;
}

.preview-block {
    display: none;
    padding-top: 15px;
}
.preview-block ul{
    padding-left: 15px;
}

div#preview-panel {
    display: flex;
    flex-direction: row;
    gap: 24px;
}
.left-panel, .right-panel {
    width: 50%;
    word-wrap: break-word;
}
.bg-gray{
    background-color: #f9fafb;
}
.preview-heading{
    margin-bottom: 15px;
}

/* Popup */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.popup-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    text-align: center;
}
.popup-buttons {
    margin-top: 15px;
}
.msg_red {
    color: #ff0000;
    font-size: 23px;
}
.btn_default{
    background-color: #6c757d;
    color: #fff;
}

/* buttton spinner */
.btn-spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid #555;
  border-radius: 50%;
  width: 14px;
  height: 14px;
  animation: spin 0.6s linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
