@import url('https://fonts.googleapis.com/css2?family=Assistant:wght@200;300;400;500;600;700;800&display=swap');

/* Universal font application */
* {
    font-family: 'Assistant', Arial, sans-serif;
}

body {
    font-family: 'Assistant', Arial, sans-serif;
    font-weight: 300;
    margin: 0;
    padding: 20px;
    padding-top: 100px;
    background: #f0f0f0;
}

/* Login page specific styles */
body.login-page {
    font-family: 'Assistant', Arial, sans-serif;
    font-weight: 300;
    background: linear-gradient(135deg, #631180 0%, #c50b83 100%);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 40px;
}

.page-logo {
    margin-bottom: 40px;
    text-align: center;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e0e0e0;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

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

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
}

.header-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo {
    height: auto;
    width: auto;
    max-height: 40px;
    max-width: 150px;
}

.client-name {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.client-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-photo-placeholder {
    width: 100%;
    height: 100%;
    background-color: #ccc;
    border-radius: 50%;
}

.logo {
    max-width: 150px;
    height: auto;
}

/* Login page logo */
.login-container .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-container .logo img {
    max-width: 200px;
    height: auto;
}

.user-info {
    text-align: right;
}

.message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.backup-info {
    font-size: 0.9em;
    color: #0c5460;
    margin-top: 5px;
    font-style: italic;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Login page error styling */
.error {
    color: #e74c3c;
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background: #fdf2f2;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
}

.controls {
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

/* Button styling */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: #c50b83;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #a3096b;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
}

/* Save button pop-out animation when becoming active */
.btn-success.pop-out {
    animation: popOut 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popOut {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.btn-text {
    background: none;
    color: #d3d3d3;
    border: none;
    text-decoration: none;
    cursor: default;
    pointer-events: none;
    transition: all 0.2s ease;
}

.btn-text.active {
    color: #000;
    cursor: pointer;
    pointer-events: auto;
}

.btn-text.active:hover {
    color: #333;
    text-decoration: underline;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    text-decoration: none;
}

/* Login page button styling */
.login-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #631180 0%, #c50b83 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
}

.shows-table {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #ddd;
    font-size: 12px;
}

/* Make table cells look cleaner */
td {
    background: transparent !important;
}

/* Ensure form controls inside table cells are completely clean */
td .form-control,
td input,
td select {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-size: 14px !important;
}

td.url-cell {
    text-align: left;
}

/* Center all form controls except URL */
td:not(.url-cell) .form-control,
td:not(.url-cell) select {
    text-align: center;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

tr:nth-child(even) {
    background: #f8f8f8;
}

tr:nth-child(odd) {
    background: #f0f0f0;
}

tr:hover {
    background: #e3f2fd;
}

/* Inactive row styling */
tr.inactive-row {
    opacity: 0.3;
}

tr.inactive-row:hover {
    opacity: 0.5;
}

.form-control {
    width: 100%;
    padding: 8px;
    border: none;
    background: transparent;
    box-sizing: border-box;
    transition: all 0.2s ease;
    font-size: 14px;
}

.form-control:focus {
    border: 1px solid #000;
    background: white;
    outline: none;
    border-radius: 4px;
}

/* Ensure ALL inputs and selects look like text by default */
input[type="text"], input[type="url"], input[type="date"], 
select.form-control, .form-control {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* RTL text direction for Hebrew text fields */
input[name*="venue"], input[name*="city"] {
    direction: rtl;
    text-align: right;
    width: 80px; /* Make city and venue fields even narrower */
}

/* Ensure validation warnings appear inline with inputs */
.city-validation-warning,
.venue-validation-warning,
.url-validation-warning,
.date-validation-warning {
    display: inline-block;
    margin-left: 5px;
    vertical-align: middle;
}

/* Ensure table cells can accommodate inputs and warnings */
td {
    white-space: nowrap;
    overflow: visible;
}

/* Success message styling */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 280px;
    text-align: center;
}

.success-message i {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
}

.success-message .success-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.success-message.show {
    opacity: 1;
    transform: translateX(0);
}

.success-message.fade-out {
    opacity: 0;
    transform: translateX(100%);
}

/* Style selects to look clean by default */
select.form-control {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Focus state for all form controls */
input[type="text"]:focus, input[type="url"]:focus, input[type="date"]:focus,
select.form-control:focus, .form-control:focus {
    background: white !important;
    border: 1px solid #000 !important;
    border-radius: 4px !important;
    outline: none !important;
}

select.form-control:focus {
    cursor: text;
}

/* Login page input styling */
input[type="text"], input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input[type="text"]:focus, input[type="password"]:focus {
    border-color: #c50b83;
    outline: none;
}

.active-active {
    background: #d4edda;
    color: #155724;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.active-inactive {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.delete-row {
    background: none;
    color: #c0c0c0;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-row:hover {
    color: #fff;
    background: #dc3545;
}

.logout {
    color: #6c757d;
    text-decoration: none;
    margin-left: 20px;
}

.logout:hover {
    text-decoration: underline;
}

.website-link {
    color: #17a2b8;
    text-decoration: none;
    font-weight: 400;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s;
}

.website-link:hover {
    background: #e3f2fd;
    text-decoration: none;
}

/* Field containers for validation warnings */
.artist-field, .dow-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.validation-warning {
    font-size: 16px;
    cursor: help;
    flex-shrink: 0;
}

/* Add new show row styling */
.add-new-row {
    background: #f8f9fa !important;
    border-top: 2px dashed #dee2e6;
}

.add-new-row td {
    padding: 8px 12px;
    border-bottom: none;
}

.add-show-btn {
    background: #28a745;
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 14px;
}

.add-show-btn:hover {
    background: #1e7e34;
    transform: scale(1.1);
}

.url-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.url-input-group .form-control {
    flex: 1;
    margin-right: 8px;
}

.url-link-icon {
    color: #17a2b8;
    text-decoration: none;
    padding: 4px;
    border-radius: 3px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
}

.url-link-icon:hover {
    background: #e3f2fd;
    color: #0d47a1;
}

.url-link-icon i {
    font-size: 12px;
}

/* Login page specific styles */
.login-container {
    background: #f8f8f8;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

/* Override general form control styles for login form */
.login-container input[type="text"], 
.login-container input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s;
    background: white !important;
    box-shadow: none !important;
}

.login-container input[type="text"]:focus, 
.login-container input[type="password"]:focus {
    border-color: #c50b83;
    outline: none;
    background: white !important;
}

/* Ensure login form labels are distinct */
.login-container label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

/* Make login form groups more spaced */
.login-container .form-group {
    margin-bottom: 25px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 24px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.back-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a {
    color: #c50b83;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}
