/* Define Color Variables with wp-essentials prefix */
:root {
    --wp-essentials-primary: #ffd247;        /* Teal */
    --wp-essentials-primary-hover: #ffaf38;  /* Darker teal */
    --wp-essentials-secondary: #e9c46a;      /* Warm yellow */
    --wp-essentials-bg: #ffffff;             /* White */
    --wp-essentials-border: #dddddd;         /* Light gray */
    --wp-essentials-text: #2b1d01;           /* Dark slate */
    --wp-essentials-muted: #6c757d;          /* Muted gray */
    --wp-essentials-shadow: rgba(0, 0, 0, 0.08);
}

/* Container */
.ui-datepicker {
    width: 260px;
    background: var(--wp-essentials-bg);
    border: 1px solid var(--wp-essentials-border);
    border-radius: 8px;
    box-shadow: 0 6px 12px var(--wp-essentials-shadow);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    padding: 8px;
}

/* Header */
.ui-datepicker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--wp-essentials-primary);
    color: var(--wp-essentials-bg);
    padding: 0.5em 0.75em;
    border-radius: 6px 6px 0 0;
}

.ui-datepicker-title {
    font-size: 1rem;
    font-weight: 600;
}

.ui-datepicker-prev:hover, .ui-datepicker-next:hover {
    background: var(--wp-essentials-primary);
}

.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next{
    top: 7px;
}

/* Weekday row */
.ui-datepicker-calendar thead {
    background: var(--wp-essentials-bg);
}

.ui-datepicker-calendar th {
    color: var(--wp-essentials-muted);
    font-weight: 500;
    padding: 0.5em 0;
    font-size: 0.85rem;
}

.ui-datepicker-calendar td a {
    display: block;
    margin: 0.1em;
    border-radius: 4px;
    text-decoration: none;
    color: var(--wp-essentials-text) !important;
    background: none !important;
}

.ui-datepicker-calendar td a:hover {
    background: var(--wp-essentials-secondary);
    color: var(--wp-essentials-bg);
}

.ui-datepicker-calendar .ui-state-active {
    background: var(--wp-essentials-primary);
    color: var(--wp-essentials-bg);
}

.ui-datepicker-calendar .ui-datepicker-today a {
    border: 1px solid var(--wp-essentials-secondary);
}

/* Footer / button panel */
.ui-datepicker-buttonpane {
    display: flex;
    justify-content: flex-end;
    padding: 0.5em 0;
}

.ui-datepicker-buttonpane button {
    background: none !important;
    border: none;
    border-radius: 4px;
    color: var(--wp-essentials-text);
    padding: 0.4em 0.8em;
    margin-left: 0.5em;
    font-size: 0.85rem;
    cursor: pointer;
}

.ui-datepicker-buttonpane button:hover {
    background: var(--wp-essentials-primary-hover);
}

/* Focus on input */
.ui-datepicker-input:focus {
    outline: 2px solid var(--wp-essentials-primary);
    outline-offset: 2px;
}

.wp-essential-field-error{
    color: #e92d2d;
}
  
.wp-essentials-file-upload-wrapper{
    display: flex;
    align-items: center;
}

.wp-essentials-file-upload-thumbnail{
    width: 35px;
    height: 35px;
    background-position: center center;
    background-size: cover;
    border-radius: 100px;
    display: inline-block;
}

.wp-essentials-file-upload-wrapper input[type=file]{
    padding: 0 0 0 15px;
}

.wp-essentials-form{
    position: relative;
}

.wp-essentials-form.show-spinner{
    opacity: 0.8;
    pointer-events: none;
}

.wp-essentials-form .loader-wrapper{
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wp-essentials-form .loader-wrapper .loader-text{
    margin-top: 20px;
    font-size: 15px;
}

.wp-essentials-form button[type="submit"] .loader{
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    border-top: 3px solid #fff;
    border-right: 3px solid transparent;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

.wp-essentials-form .loader-wrapper .loader {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: inline-block;
    border-top: 3px solid #474747;
    border-right: 3px solid transparent;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

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

.wp-essentials-input[error]{
    background-color: #ffdede;
    border: 2px solid #ff6a6a;
}

.form-group{
    padding: 0.5em 0;
}

.wp-essentials-form-submit-wrapper{
    padding: 0.5em 0;
    display: flex;
    justify-content: flex-end;
}

.wp-essentials-form-submit-wrapper.wp-essentials-form-submit-wrapper-with-back-button{
    justify-content: space-between;
}

.wp-essentials-label .required{
    color: rgb(155, 0, 0);
}

.wp-essentials-gallery-thumbnail{
    width: 100px;
    height: 100px;
    background-position: center center;
    background-size: cover;
    border-radius: 8px;
    display: inline-block;
    margin: 5px;
    position: relative;
}

.wp-essentials-gallery-remove-image{
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 23px;
}

.wp-essentials-errors{
    background-color: #ffdede;
    border: 2px solid #ff6a6a;
    color: #ff6a6a;
    padding: 20px;
}

.wp-essentials-errors p {
    margin-bottom: 0;
}

.wp-essentials-info{
    background-color: #d1ecf1;
    border: 2px solid #0c5460;
    color: #0c5460;
    padding: 20px;
}

.wp-essentials-info p {
    margin-bottom: 0;
}

.wp-essentials-success{
    background-color: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
    padding: 20px;
}

.wp-essentials-success p {
    margin-bottom: 0;
}