:root {
    --sub-accent-color: #1a1a1a;
    --sub-bg-accent-color: #1a1a1a;
    --keyd-accent: #FFCC00;
}

html,
body {
    margin-top: 0 !important;
    box-sizing: border-box !important;
    overflow: auto !important;
}

body {
    font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji !important;
}

body div {
    box-sizing: border-box !important;
}

.wrap {
    padding: 100px 20px 75px 20px;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.wrap.home {
    max-height: 100dvh;
}

.content {
    flex: 1;
    position: relative;
}

#no-results-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 500;
    color: gray;
}

#submissions-table {
    width: 100%;
    max-height: calc(100dvh - 235px);
    overflow: auto;
}

#submissions-table:active {
    cursor: grabbing;
}

.wrap h1 {
    margin-bottom: 25px;
}

#wpadminbar {
    display: none;
}

button {
    font-family: inherit !important;
    border-radius: 0 !important;
}

button:disabled,
button:disabled:hover {
    background-color: light-dark(rgba(239, 239, 239, 0.3), rgba(19, 1, 1, 0.3)) !important;
    color: light-dark(rgba(16, 16, 16, 0.3), rgba(255, 255, 255, 0.3)) !important;
    border-color: light-dark(rgba(118, 118, 118, 0.3), rgba(195, 195, 195, 0.3)) !important;
}

.keyd-button.dark-bg {
    border: 1px solid var(--keyd-accent) !important;
    background-color: #FFCC00 !important;
}

.comments-cell > .add-comment-button {
    text-align: left;
}

.comments-cell > .add-comment-button.keyd-button.dark {
    border: none !important;
}

.comments-cell > .add-comment-button.keyd-button.dark:hover,
.comments-cell > .add-comment-button.keyd-button.dark:active,
.comments-cell > .add-comment-button.keyd-button.dark:focus {
    background-color: transparent !important;
    color:var(--sub-accent-color) !important;
    text-decoration: underline;
}

.keyd-button.dark-bg:hover {
    background-color: transparent !important;
    color: #FFCC00 !important;
}

.keyd-button.small {
    font-size: 0.8rem;
    padding: 5px 7px !important;
    width: 100%;
}

.keyd-button.dark {
    border: 2px solid var(--sub-bg-accent-color) !important;
}

.keyd-button.dark:hover,
.keyd-button.dark:active,
.keyd-button.dark:focus {
    color: white !important;
    background-color: var(--sub-bg-accent-color) !important;
}

.keyd-button {
    color: var(--sub-bg-accent-color) !important;
    border: 2px solid var(--keyd-accent) !important;
    background: transparent !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    text-align: center !important;
}

.keyd-button:hover,
.keyd-button:focus,
.keyd-button:active {
    color: var(--sub-bg-accent-color) !important;
    background-color: var(--keyd-accent) !important;
}

.h1-and-add {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    display: none;
}

h1 {
    margin-block-end: 0 !important;
    margin-block-start: 0 !important;
    font-family: inherit !important;
    text-transform: unset !important;
    font-weight: 600 !important;
}

.content th {
    line-height: 1.2;
    text-wrap: nowrap;
    vertical-align: middle;
    font-weight: 500 !important;
}

.edit-key-button {
    padding: 0;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
}

.editable-key::first-letter {
    text-transform: uppercase;
}

.edit-key-button:hover,
.edit-key-button:active,
.edit-key-button:focus {
    background-color: transparent !important;
}

.edit-key-button svg {
    width: 15px;
    height: 15px;
}

.editable-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 2px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.editable-header:has(.editable-key-input) {
    background-color: #f1f1f1;
}

.copyright {
    position: fixed;
    background-color: var(--sub-bg-accent-color);
    color: white;
    font-weight: 500;
    bottom: 0;
    width: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.copyright p {
    text-align: center;
    margin: 0;
    padding: 10px;
    color: inherit;
    font-size: 12px;
}

.site-footer,
header,
footer,
#site-header,
#main-footer,
header,
[data-elementor-type="header"] {
    display: none !important;
}

.key-input {
    width: 130px !important;
    padding: 5px !important;
    font-family: inherit;
}

input,
select {
    font-family: inherit !important;
}

.key-input:focus {
    outline: none;
}

.contact-status-header {
    background-color: #1C1C1C !important;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 0 10px 0 !important;
}

.contact-status-header svg {
    width: 24px;
    height: 24px;
}

.contact-status-header,
.contact-status-cell {
    width: 60px;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
}

.status-cell-wrap {
    display: flex;
    flex-wrap: wrap;
    max-width: 300px;
}

.status-cell-outer {
    max-width: 280px !important;
}

.content td {
    max-width: 500px;
}

table tbody>tr>td {
    background-color: white !important;
}

.submission-row:hover td {
    filter: brightness(97%);
}

table th {
    background-color: rgb(241, 241, 241);
}

table th,
table td {
    border: 1px solid #ccc !important;
    font-family: inherit !important;
    padding: 4px 10px 4px 12px !important;
    font-size: 0.9rem !important;
}

table td {
    vertical-align: middle !important;
}

.message {
    min-width: 450px !important;
}

table > tbody > tr > td:not(:first-child) {
    min-width: 150px;
}

/* Plugin header */

.plugin-header {
    background-color: var(--sub-bg-accent-color);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.logo {
    flex-basis: 185px;
    margin-top: 3px;
    margin-bottom: -3px;
}

.plugin-header svg {
    width: 80px;
    height: auto;
}

.plugin-header h1 {
    font-size: 1.5rem;
    color: rgb(150, 150, 150);
}

/* End of Plugin header */

/* Submission checkbox */

select {
    color: #1a1a1a !important;
    background-position: calc(100% - 4px) !important; /* Move background arrow icon 8px from right edge */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 1em;
    padding-right: 24px !important;  /* Increased right padding for arrow */
    padding-left: 8px !important;
    background-position: calc(100% - 8px) center !important;
    background-size: 14px !important;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    min-width: 140px; /* Ensure minimum width for readability */
}

.select-submission {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 3px;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    position: relative;
    margin-top: 5px;
}

.select-submission:checked {
    background-color: var(--sub-accent-color);
    border-color: var(--sub-accent-color);
}

.select-submission:checked::after {
    content: '\2713';
    font-weight: 600;
    color: white;
    font-size: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* end of Submission checkbox */

/* truncate text */

.truncated-text {
    display: inline;
}

.full-text {
    display: none;
}

.toggle-text-button {
    background: none;
    border: none;
    color: #0073aa;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.9em;
    margin-left: 5px;
    padding: 0;
    text-decoration: none;
    font-weight: 500;
    color: var(--sub-accent-color);
}

.toggle-text-button:hover,
.toggle-text-button:active,
.toggle-text-button:focus {
    color: var(--sub-accent-color);
    background: none;
}

/* end of truncate text */

/* manual submission form */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group input,
.form-group select {
    padding: 10px !important;
}

#form-fields-container,
#add-submission-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* manual submission form - on pc not as wide */

@media (min-width: 1210px) {
    .wrap.add-submission h1, 
    .wrap.add-submission form#add-submission-form {
        padding-left: 20%;
        padding-right: 20%;
        box-sizing: border-box;
    }
}

#form-fields-container > p {
    text-align: left;
    margin: 0;
}

#submit-button {
    margin-top: 10px;
}

.add-submission {
    gap: 25px;
}

.add-submission > h1 {
    margin-top: 25px;
    font-size: 2.5rem !important;
}

.add-submission > button {
    width: fit-content;
}

/* End of manual submission form */

/* Operations */

.operations-container {
    margin-bottom: 25px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    flex-wrap: wrap;
}

.operations-container > .left-operations {
    display: flex;
    align-items: flex-end;
    gap: 25px;
    flex: 2;
}

#operations-dropdown {
    position: absolute;
    z-index: 99;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 5px;
    display: none;
    top: 50px;
}

#operations-dropdown ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#operations-dropdown li {
    cursor: pointer;
    padding: 5px 10px;
    text-wrap: nowrap;
}

#operations-dropdown li:hover {
    background: #f0f0f0;
}

.status-list-head {
    padding-left: 10px;
    font-weight: 600;
}

#delete-submissions {
    color: rgb(161, 15, 15);
    font-weight: 600;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    padding: 5px 10px;
    text-wrap: nowrap;
}

#delete-submissions:hover {
    background: #ffe6e6 !important;
}

#delete-submissions > svg {
    width: 12px;
    height: 12px;
}

#form-filter,
#sort-order {
    padding: 5px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    width: 100%;
    max-width: 160px;
}

.form-filter-wrap,
.sort-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 100px;
    flex: 1;
    max-width: 160px;
}

.form-filter-wrap > label,
.sort-options > label {
    font-weight: 500;
    font-size: 14px;
}

/* end of Operations */

.dropdown-wrap {
    position: relative;
}

.dropdown-wrap button {
    text-wrap: nowrap;
}

.right-operations {
    display: flex;
    gap: 25px;
    flex: 1;
    justify-content: flex-end;
}

/* Status management */

#status-manager-dropdown {
    position: absolute;
    z-index: 99;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 15px;
    display: none;
    top: 50px;
    right: 0;
}

.delete-status-icon {
    width: 8px;
    height: auto;
}

#status-manager-list li {
    list-style: none;
    padding: 5px 0px;
    display: flex;
    align-items: center;
    gap: 7px;
}

#status-manager-list > li > span {
    display: block;
    line-height: 1.3;
}

#status-manager-list > li > img {
    cursor: pointer;
}

#status-manager-list {
    padding: 0;
    margin-bottom: 10px;
}

/* End of Status management */

/* Status filters */

#filter-dropdown {
    position: absolute;
    z-index: 99;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 10px 5px;
    display: none;
    top: 50px;
    right: 0;
}

#filter-dropdown ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#filter-dropdown li {
    padding: 7px 10px;
}

#filter-dropdown li:hover {
    background: #f0f0f0;
}

#filter-dropdown label {
    display: flex;
    gap: 7px;
    align-items: center;
}

.filter-section-title {
    font-weight: 500;
    padding: 0px 10px 0px 10px;
    display: block;
}

.filter-section-title:not(:first-child) {
    padding: 10px 10px 0px 10px;
}

/* Status filter checkbox */

.status-filter {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border: 1px solid #ccc;
    border-radius: 2px;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    position: relative;
}

.status-filter:checked {
    background-color: var(--sub-accent-color);
    border-color: var(--sub-accent-color);
}

.status-filter:checked::after {
    content: '\2713';
    font-weight: 600;
    color: white;
    font-size: 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Status filter radio buttons */

.status-radio {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #ccc;
    background-color: #fff;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    position: relative;
}

.status-radio:checked {
    background-color: var(--sub-bg-accent-color);
    border-color: var(--sub-bg-accent-color);
}

.status-radio:checked::after {
    content: '';
    width: 9px;
    height: 9px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* End of status filters */


/* Spinner */

#loading-spinner {
    position: absolute;
    min-height: 200px; /* Adjust as needed */
    text-align: center;
    color: #555;
    font-size: 16px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.spinner {
    border: 4px solid #dadada;
    border-top: 4px solid var(--keyd-accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* End of Spinner */

/* Status pills */

.status-pill {
    font-weight: 500;
    padding: 2px 5px;
    border-radius: 4px;
    border-width: 2px;
    border-style: solid;
    border-color: gray;
    text-wrap: nowrap;
    display: block;
    margin: 5px;
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
}

.cell-status-reached_out {
    border-color: #49a7eb;
    border-width: 2px;
}

.cell-status-scheduled_meeting {
    border-color: #b849eb;
    border-width: 2px;
}

.cell-status-sent_offer {
    border-color: var(--keyd-accent);
    border-width: 2px;
}

.cell-status-made_deal {
    border-color: #23af23;
    border-width: 2px;
}

.cell-status-denied {
    border-color: gray;
    border-width: 2px;
}


/* End of Status pills */

/* Comments */

.comments-cell > div {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.comment-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    gap: 7px;
    background-color: transparent;
    border: 1px solid gray;
    border-radius: 4px;
    font-size: 12px;
}

.comment-pill button {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
}

.delete-comment-button > svg,
.delete-comment-button > img {
    width: 12px;
    height: auto;
}

.delete-status-button > svg,
.delete-status-button > img {
    width: 8px;
    height: auto;
}

.delete-comment-button,
.delete-status-button {
    padding: 0;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: inline-flex;
    flex-shrink: 0;
}

.delete-comment-button:hover,
.delete-comment-button:active,
.delete-comment-button:focus,
.delete-status-button:hover,
.delete-status-button:active,
.delete-status-button:focus {
    background-color: transparent !important;
}

.comments-cell {
    min-width: 350px !important;
}

/* End of comments */

@media (max-width: 1110px) {
    button,
    label,
    .status-pill,
    li {
        font-size: 0.8rem !important;
    }
    .add-submission h1 {
        font-size: 2rem;
    }
    .delete-status-icon {
        width: 12px;
    }
    .add-submission > h1 {
        font-size: 2rem !important;
        line-height: 2.3rem !important;
    }
    .left-operations,
    .right-operations {
        justify-content: space-between;
    }
    .dropdown-wrap {
        flex: 1;
    }
    .dropdown-wrap button {
        width: 100%;
    }
}

@media (max-width: 830px) {
    table th {
        font-size: 0.8rem !important;
    }
    table {
        margin-block-end: 0 !important;
    }
    .wrap {
        padding: 90px 20px 75px 20px;
    }
    .operations-container {
        flex-direction: column;
        gap: 15px;
    }
    .right-operations {
        width: 100%;
        justify-content: space-between;
    }
    .left-operations {
        width: 100%;
    }
    .left-operations > div {
        flex: 1;
    }
    .plugin-header h1 {
        display: none;
    }
    .logo {
        flex-basis: initial;
    }
    .logo svg {
        width: 60px;
    }
    .keyd-button {
        padding: 5px;
    }
    #submissions-table {
        height: calc(100dvh - 265px);
    }
    #operations-dropdown,
    #filter-dropdown,
    #status-manager-dropdown {
        top: 40px;
    }
}

@media (max-width: 540px) {
    .left-operations {
        gap: 15px !important;
    }
    .add-submission > h1 {
        font-size: 1.5rem !important;
        line-height: 1.8rem !important;
    }
    .left-operations {
        flex-wrap: wrap;
    }
}

@media (max-width: 440px) {
    .left-operations {
        flex-direction: column-reverse;
        gap: 5px !important;
    }
    .dropdown-wrap {
        width: 100%;
    }
    #operations-dropdown,
    #filter-dropdown,
    #status-manager-dropdown {
        top: 35px;
        width: 100%;
    }
    #submissions-table {
        height: calc(100dvh - 340px);
    }
}

/* Start of show-hide columns feature */
.small-icon {
    width: 22px !important; 
    height: 22px !important; 
    fill: rgb(241, 241, 241);
    cursor: pointer; 
    background-color: transparent;
}

.small-icon svg {
    width: 100% !important; 
    height: 100% !important;
    fill: currentColor;
    fill-opacity: 1;
}

.eye-icon {
    display: inline-block; /* Ensure the icon is visible */
    cursor: pointer;
    width: 18px;
    height: 18px;
    fill: #000; /* Ensure the icon has a visible fill color */
    margin-left: 5px; /* Add some spacing */
    vertical-align: middle; /* Align the icon vertically */
    transition: opacity 0.3s ease;
}

.eye-icon:hover {
    opacity: 0.7;
}

/* Initially hide both edit and eye icons */
.edit-key-button, .eye-icon {
    display: none;
}

/* Column visibility styles */
.hide-column {
    opacity: 0.3;
}

.hidden-column {
    display: none !important;
}

th.hidden-column {
    display: none !important;
}

td.hidden-column {
    display: none !important;
}

/* Column visibility styles */
.column-marked-hidden {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.column-hidden {
    display: none !important;
}

/* Update eye icon styles */
.eye-icon.marked-for-hiding {
    opacity: 0.3;
}

/* Small edit icon in header */
#edit-columns.small-icon {
    width: 18px !important;
    height: 18px !important;
}

#edit-columns.small-icon svg {
    width: 18px !important;
    height: 18px !important;
}

.editable-key-input {
    font-size: 0.9rem;
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    width: auto;
    min-width: 100px;
    background-color: #f1f1f1;
    transition: all 0.2s ease;
    color: var(--sub-accent-color);
}

.editable-key-input:focus {
    outline: none;
    background-color: #f1f1f1;
}

/* Form input styles */
input[type=date], 
input[type=email], 
input[type=number], 
input[type=password], 
input[type=search], 
input[type=tel], 
input[type=text], 
input[type=url], 
select, 
textarea {
    border: 1px solid #CCCCCC !important;
    border-radius: 0px !important;
    padding: 5px 10px !important;
}

/* Update editable key input to override the new default styles */
.editable-key-input {
    border: none;
    border-radius: 4px;
    background-color: #f1f1f1;
}

/* Tooltip styles */
.tooltip-container {
    position: relative;
    z-index: 1000;
}

.tooltip {
    visibility: hidden;
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffcc00;
    color: #1a1a1a;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1001;
    font-weight: 500;
    opacity: 1 !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.12);
}

.tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;    transform: translateX(-50%) rotate(45deg);    width: 8px;    height: 8px;    background-color: #ffcc00;    opacity: 1 !important;}.tooltip-container:hover .tooltip {    visibility: visible;}

/* Header icons styles */
.small-icon {
    width: 22px !important; 
    height: 22px !important; 
    cursor: pointer;
}

.small-icon svg {
    width: 100% !important; 
    height: 100% !important;
    fill: white !important; /* Force white color for header icons */
}

.header-right .small-icon {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.header-right .small-icon:hover {
    opacity: 1;
}
