input.url-input:-webkit-autofill, input.username-input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
}
/* Orange border for the URL input field */
.url-input, .username-input {
    background-color: #ffffff;
    border-width: 1px;
    box-shadow: none;
    outline: none;
    background-clip: padding-box !important;
}
.url-input:focus,
.username-input:focus {
  border-color: #222 !important;       /* Even darker on focus */
  box-shadow: 0 0 0 1px #222; /* Adds a 1px 'outer border' effect */
  background-color: #ffffff;
  outline: none;
}

input.url-input:focus:-webkit-autofill,
input.username-input:focus:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset, 0 0 0 1px #222 !important; /* 1px outer border */
    box-shadow: 0 0 0 1000px #ffffff inset, 0 0 0 1px #222 !important;       /* 1px outer border */    
}

/* Handle disabled + autofill */
input.url-input:disabled:-webkit-autofill,
input.username-input:disabled:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #f3f3f3 inset !important;
    box-shadow: 0 0 0 1000px #f3f3f3 inset !important;
}
/* Style for the URL preview at the bottom of the form */
b.url-preview, strong.url-preview, span.url-preview {
    color: #ff944d;
    font-weight: bold;
    font-size: 1.08em;
    word-break: break-all;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* Summarize app spinner and website row styles */
/* Spinner: ensure perfect vertical alignment */
/* Orange spinner */
.spinner.small-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #ff944d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin: 0;
    position: relative;
    top: 0.5px;
}
/* Improved horizontal alignment for spinner/status/URL */
.website-title-row {
  display: flex;
  align-items: center;
  margin-bottom: 0.2em;
  gap: 1.2em;
}
.website-title {
  font-weight: bold;
  font-size: 1.05em;
  flex: 0 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
}
.site-spinner {
  display: flex;
  align-items: center;
  gap: 0.4em;
  flex-shrink: 0;
  margin-left: 0;
  line-height: 1.1;
}
.site-status {
  font-size: 0.98em;
  color: #555;
  margin-left: 0.2em;
  white-space: nowrap;
}
body {
    font-family: Arial, sans-serif;
    background-color: #f4f6f9;
    margin: 0;
    padding: 40px;
}

.form-container {
    max-width: 600px;
    margin-top: 30px !important;
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h1,
h2 {
    text-align: center;
    color: #333;
}

form p {
    margin-bottom: 15px;
}

input:not([type="checkbox"]),
select,
button {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

input:not([type="checkbox"]):disabled,
select:disabled {
    background-color: #f0f0f0;
    /* light gray background */
    border-color: #aaa;
    /* slightly darker border */
    color: #777;
    /* muted text color */
    cursor: not-allowed;
    /* show "disabled" cursor */
    opacity: 0.7;
    /* slightly faded */
}

button,
input[type="file"]::file-selector-button 
{
    background-color: #ff944d;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

input[type="file"]::file-selector-button {
    border: none;
    border-radius: 4px;
}

button:hover,
input[type="file"]::file-selector-button:hover,
#submit-btn:hover
{
    background-color: #ff7f1a;
}

.error {
    color: red;
    text-align: center;
    margin-top: 15px;
}

.result {
    margin-top: 20px;
    padding: 15px;
    background-color: #eafaf1;
    border-left: 5px solid #28a745;
    border-radius: 5px;
}

textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    resize: vertical;
    /* allow vertical resize only */
    min-height: 80px;
    /* reasonable default height */
}

textarea:disabled {
    background-color: #f0f0f0;
    /* light gray background */
    border-color: #aaa;
    /* slightly darker border */
    color: #777;
    /* muted text color */
    cursor: not-allowed;
    /* show "disabled" cursor */
    opacity: 0.7;
    /* slightly faded */
}

#loader {
    display: flex;
    justify-content: center;
    /* Horizontal centering */
    align-items: center;
    /* Vertical alignment if needed */
    width: 100%;
    /* Ensure it spans full width */
    /*background: #f00000;*/
    /* just to visualize container */
    flex-shrink: 0;
}

#loader.hidden {
    display: none;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top: 4px solid #ff944d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-top: 20px;
    /*background: yellow;*/
    display: block;
    /* or just remove display property */
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#status-text {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: #555;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff944d;
    /* Modern browsers support this */
    cursor: pointer;
    vertical-align: middle;
    margin-right: 8px;
}

input[type="checkbox"]:disabled {
    accent-color: #aaa;
    cursor: not-allowed;
    opacity: 0.7;
}

.expandable-container {
    margin-top: 20px;
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 8px;
    background-color: #fdfdfd;
}

.expand-toggle {
    cursor: pointer;
    color: #ff944d;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    text-align: left;
    display: flex;
    align-items: center;
    transition: color 0.3s;
    user-select: none;       /* Standard */
    -webkit-user-select: none; /* Chrome/Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* IE/Edge */    
}

.expand-toggle:hover {
    color: #ff7f1a;
    text-decoration: underline;
}

.top-right-buttons {
  position: absolute;
  top: 20px;
  right: 40px;
  display: flex;
  gap: 10px;
  z-index: 1000;
  white-space: nowrap;  
}
.btn, .btn-other-page, .btn-logout {
  background: #ff944d;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1rem;
  font-family: Arial, sans-serif;  
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
  height: 30px;
  min-width: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  vertical-align: middle;
  border: none;
  outline: none;
  box-shadow: none;
}
.btn:hover {
  background: #ff7f1a !important;
}
.btn-logout {
  background: #e74c3c;
}
.btn-logout:hover {
  background: #c0392b !important;
}

button:disabled, 
#submit-btn:disabled,
.btn:disabled
{
    background-color: #cccccc !important;
    cursor: not-allowed !important;
    color: #666666 !important;
}

input[type="file"]::file-selector-button:disabled
{
    background-color: #cccccc !important;
    cursor: not-allowed !important;
    color: #666666 !important;
}