/* business_styles.css */

/* --- Business Directory Pages --- */
.business-header, .add-business-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
}
.business-header .page-title, .add-business-header .page-title {
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: #4a5568;
}
.business-header .page-icon, .add-business-header .page-icon {
    font-size: 2.5rem;
    color: #48bb78;
}

/* Centering the back button */
.page-header-top {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem 0;
}

/* Back button styles */
.btn-green {
    background-color: #2ecc71;
    color: white;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.btn-green:hover {
    background-color: #27ae60;
}

/* --- Business Grid and Cards --- */
.business-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    list-style: none;
    padding: 0;
}
.business-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    border-radius: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.business-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.business-name-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 0.5rem;
}
.business-name {
    font-size: 1.5rem;
    color: #2d3748;
}
.open-status-bulb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    display: inline-block;
}
.open-status-bulb.open {
    background-color: #48bb78; /* Green */
}
.open-status-bulb.closed {
    background-color: #ef4444; /* Red */
}
.business-info {
    font-size: 1rem;
    color: #5a67d8;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}
.business-info .label {
    font-weight: 600;
    color: #718096;
}
.business-info i {
    font-size: 1.1rem;
    color: #48bb78;
    margin-top: 2px;
}
.open-hours-info {
    margin-top: 1rem;
}
.open-hours-info .label {
    font-weight: 600;
    color: #718096;
}
.hours-text {
    font-style: italic;
    font-size: 0.95rem;
    color: #4a5568;
    margin-left: 2rem;
}
.card-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.btn-edit, .btn-delete, .btn-status-toggle {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}
.btn-edit {
    background-color: #3b82f6;
    color: white;
}
.btn-edit:hover {
    background-color: #2563eb;
}
.btn-delete {
    background-color: #ef4444;
    color: white;
}
.btn-delete:hover {
    background-color: #dc2626;
}

/* --- Status Toggle Button --- */
.status-toggle-container {
    flex: 1 1 100%; /* Ensure it takes full width on its own row */
    text-align: center;
}
.btn-status-toggle {
    background-color: #f1f5f9; /* Light gray base color */
    color: #4a5568;
    position: relative;
    padding-left: 3rem; /* Make space for the icon */
    padding-right: 1.5rem;
}
.btn-status-toggle i {
    position: absolute;
    left: 1rem;
    font-size: 1.2rem;
    transition: color 0.3s ease, transform 0.3s ease;
}
.btn-status-toggle.btn-toggle-open {
    background-color: #10b981; /* Green when clicked to set status as open */
    color: white;
}
.btn-status-toggle.btn-toggle-closed {
    background-color: #f87171; /* Red when clicked to set status as closed */
    color: white;
}
.btn-status-toggle.btn-toggle-open i {
    transform: rotate(0deg);
}
.btn-status-toggle.btn-toggle-closed i {
    transform: rotate(180deg);
}

/* --- Form Styles --- */
.add-business-form-section {
    padding: 2rem;
    margin: auto;
    max-width: 800px;
}
.add-business-form .form-group {
    margin-bottom: 1.5rem;
}
.add-business-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}
.add-business-form input[type="text"],
.add-business-form select,
.add-business-form textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: 'Inter', 'Noto Sans Sinhala', sans-serif;
    box-sizing: border-box;
}
.form-group-open-hours .day-input {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 1rem;
}
.form-group-open-hours .day-input label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.form-group-open-hours .time-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 3;
}
.form-group-open-hours .time-inputs input {
    flex: 1;
    min-width: 0;
}
.form-group-submit {
    margin-top: 2rem;
}
.btn-primary-modern {
    background-color: #48bb78;
    color: white;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-primary-modern:hover {
    background-color: #38a169;
}
/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    .business-header .page-title {
        font-size: 1.8rem;
    }
    .business-header .page-icon {
        font-size: 2rem;
    }
    .business-grid {
        grid-template-columns: 1fr;
    }
    .card-actions {
        flex-direction: column;
    }
    .btn-edit,
    .btn-delete {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .status-toggle-container {
        margin-bottom: 1rem;
    }
}