/* Base Styles */
body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2 {
    margin-bottom: 20px;
    text-align: center;
}

h1 {
    font-size: 2em;
}

h2 {
    margin-top: 30px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
    font-size: 1.5em;
}

ul {
    list-style-type: none;
    padding: 0;
}

li {
    margin-bottom: 10px;
}

/* Header Styles */
.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.company-branding {
    display: flex;
    align-items: center;
    flex: 1;  /* Allow the branding to take up available space */
}

.company-logo {
    max-height: 60px;  /* Increased from 40px */
    max-width: 200px;  /* Increased from 150px */
    margin-right: 20px;
    object-fit: contain;  /* Ensure the logo maintains its aspect ratio */
}

.company-name {
    font-size: 1.5em;
    font-weight: bold;
    color: #4CAF50;
}

.user-actions {
    display: flex;
    align-items: center;
    margin-left: 20px;  /* Add some space between branding and user actions */
}

.welcome-message {
    margin-right: 20px;
    font-size: 1.1em;
    color: #333;
}

/* Button Styles */
.btn {
    display: inline-block;
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background-color: #45a049;
}

.btn-logout {
    background-color: #f44336;
}

.btn-logout:hover {
    background-color: #d32f2f;
}

.btn-delete {
    background-color: #f44336;
    color: white;
}

.btn-delete:hover {
    background-color: #d32f2f;
}

.btn-edit {
    background-color: #4CAF50;
    color: white;
}

.btn-edit:hover {
    background-color: #45a049;
}

/* Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.dashboard-card::before {
    content: '';
    display: block;
    height: 40px;
    margin-bottom: 15px;
}

.dashboard-card .btn {
    position: absolute;
    top: 20px;
    left: 20px;
}

.dashboard-card h2 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4CAF50;
    color: #4CAF50;
    font-size: 1.5em;
}

.dashboard-card ul li a {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.3s;
}

.dashboard-card ul li a:hover {
    color: #45a049;
    text-decoration: underline;
}

/* Doggo List Styles */
.dashboard-doggo-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.dashboard-doggo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    border: 1px solid #45a049;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
    background-color: #4CAF50;
    color: white;
}

.dashboard-doggo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background-color: #45a049;
}

.dashboard-doggo-thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 2px;
    border: 2px solid white;
}

.dashboard-doggo-name {
    font-weight: bold;
    margin-top: 2px;
    margin-bottom: 6px;
    word-break: break-word;
    max-width: 100%;
}

.dashboard-remove-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s;
    width: 100%;
    max-width: 100px;
}

.dashboard-remove-btn:hover {
    background-color: #d32f2f;
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="file"],
select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    display: inline-block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position-x: calc(100% - 10px);
    background-position-y: center;
    padding-right: 30px;
}

select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

/* Field validation */
.field-error {
    border: 2px solid #e3342f;
    color: #e3342f;
    font-weight: bold;
    box-sizing: border-box;
}

.error-message {
    color: #e3342f;
    font-weight: bold;
    font-size: 0.875rem;

    display: none;

    margin-top: 4px;
}

.required-asterisk {
    color: #e3342f;
    font-weight: bold;
    margin-left: 0.25rem;
}

@media (max-width: 600px) {
    .field-error {
        border-width: 2px;
    }
}

/* Responsive Styles */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .company-branding {
        margin-bottom: 15px;
    }

    .company-logo {
        max-height: 50px;  /* Slightly smaller on mobile for better fit */
        max-width: 150px;
    }

    .user-actions {
        margin-left: 0;
    }

    .welcome-message {
        margin-right: 0;
        margin-bottom: 10px;
    }
}

.date-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.date-navigation button {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 14px; /* Slightly smaller font size */
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    flex: 0 1 auto; /* Allow buttons to shrink if needed */
}

.date-navigation button:hover {
    background-color: #45a049;
}

.day-name {
    width: 100%;
    text-align: center;
    font-weight: 600;
    margin-bottom: 4px;
}

.day-name-desktop {
    width: auto;
    display: inline;
}

.day-name-mobile {
    display: none;
}

@media (max-width: 768px) {
    .day-name-desktop {
        display: none;
    }
    .day-name-mobile {
        display: block;
        width: 100%;
        text-align: center;
    }
}

.date-picker {
    font-family: 'Poppins', sans-serif;
    font-size: 14px; /* Slightly smaller font size */
    padding: 8px 12px; /* Slightly smaller padding */
    border: 2px solid #4CAF50;
    border-radius: 5px;
    background-color: white;
    color: #333;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: auto; /* Allow the input to size based on content */
    max-width: 120px; /* Set a maximum width */
}

.date-picker:focus {
    border-color: #45a049;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.3);
}

/* Styling the calendar icon (this might not work in all browsers) */
.date-picker::-webkit-calendar-picker-indicator {
    color: #4CAF50;
    font-size: 16px;
    padding: 5px;
}

/* For browsers that support it, we can style the actual calendar dropdown */
.date-picker::-webkit-datetime-edit {
    padding: 0;
}

.date-picker::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

.date-picker::-webkit-datetime-edit-text {
    padding: 0 5px;
}



.schedule-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.schedule-column {
    flex: 1;
    min-width: 0; /* This prevents flex items from overflowing */
}

.schedule-slot {
    margin: 5px 0;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f0f0f0;
    text-align: center;
    transition: background-color 0.3s ease; /* Add transition for smooth color change */
}

.schedule-slot.taken {
    background-color: #ffcccb;
    cursor: pointer;
}

.schedule-slot.locked {
    background-color: #e0e0e0;
    cursor: not-allowed;
}

.schedule-slot.highlight {
    background-color: #b3e6b3; /* Light green background when highlighted */
}

.doggo-item {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    border-radius: 4px;
    cursor: move;
    user-select: none; /* Prevent text selection while dragging */
}

.doggo-item {
    background-color: #4CAF50;
    color: white;
    padding: 10px;
    border-radius: 4px;
    cursor: move;
}

.message {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    text-align: center;
}

.message.success {
    background-color: #dff0d8;
    color: #3c763d;
}

.message.error {
    background-color: #f2dede;
    color: #a94442;
}

.message.info {
    background-color: #d9edf7;
    color: #31708f;
}

.schedule-slot.blocked {
    background-color: #f0f0f0;
    color: #999;
    cursor: not-allowed;
}

@keyframes tutorialHighlight {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(66, 153, 225, 0);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(66, 153, 225, 0.7);
        transform: scale(1.05);
        background-color: #ffd700;  /* Gold color */
    }
}

.tutorial-highlight {
    animation: tutorialHighlight 2s ease-in-out;
    z-index: 100;
    position: relative;
}
.instructions-container {
    margin-bottom: 20px;
}

.instructions-toggle {
    width: 100%;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 10px 15px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.instructions-toggle:hover {
    background-color: #e9ecef;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.instructions-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 5px 5px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: none;
}

.instructions-box.show {
    display: block;
}

.instructions-box ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

.instructions-box li {
    margin-bottom: 5px;
}

.instructions-box p {
    margin-bottom: 0;
    color: #6c757d;
}
.schedule-restriction {
    padding: 1rem;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 0.5rem;
    margin: 1rem 0;
    text-align: center;
    font-size: 0.875rem;
}


/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

/* Add Doggo Form Styles */
.add-doggo-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.add-doggo-form input[type="file"] {
    margin: 10px 0;
}

.breed-image-preview {
    display: block;
    max-width: 200px;
    margin: 10px auto;
    border-radius: 8px;
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.top-nav h1 {
    margin: 0;
}

/* Message Styles */
.message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    text-align: center;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Form Styling */
form {
    margin-bottom: 20px;
}

form input[type="text"],
form select {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

form button {
    width: 100%;
    margin-top: 10px;
}

.password-field {
    position: relative;
    width: 100%;
}

.password-field input {
    width: 100%;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    background: none;
    border: none;
    font-size: 14px;
    color: #666;
    z-index: 2;
    padding: 0;
    margin: 0;
}


/* Prevent iOS rubber band scrolling */
html, body {
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

/* Additional iOS fixes */
body {
    position: relative;
    overflow-y: auto;
    min-height: 100vh;
    min-height: -webkit-fill-available;
}

/* For your container elements */
.container, .main, .content {
    overscroll-behavior: contain;
}

/* iOS-specific override */
@supports (-webkit-touch-callout: none) {
    /* iOS only */
    html, body {
        overscroll-behavior-y: none;
    }
}



/* Footer + Ad bar */
.site-footer{
    position: relative;
    background: var(--company-primary-color);
    color: var(--company-primary-text-color);
    padding: 1rem 0 0; /* room above ad strip */
    border-top: 1px solid rgba(255,255,255,0.08);
}
.site-footer__inner{
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.site-footer__links a{
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    margin-right: 1rem;
}
.site-footer__links a:hover{ text-decoration: underline; }

/* Full-width ad strip at the bottom of the footer */
.adbar{
    width: 100%;
    background: var(--company-secondary-color);
    color: var(--company-secondary-text-color);
    padding: .25rem 0;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.adbar:empty {
    display: none;
}

/* Optional: make footer stick to viewport bottom on short pages */
.site-footer.sticky{
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
}
