/* General form styles */
.form-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-section h2 {
    color: #438d9a;
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.form-section form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #1b272e;
    font-weight: 500;
}

.form-section input,
.form-section select,
.form-section textarea,
.form-select {
    width: 95%;
    padding: 10px;
    border: 1px solid #D9D9D9;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: white;
}

.form-section input:focus,
.form-section select:focus,
.form-section textarea:focus,
.form-select:focus {
    border-color: #438d9a;
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 124, 140, 0.2);
   
    
}

.form-section .btn {
    background-color: #438d9a;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.form-section .btn:hover {
    background-color: #7FCBDE;
}

.form-section .errorlist {
    color: #dc3545;
    font-size: 14px;
    list-style: none;
    padding: 0;
    margin: 5px 0 0;
}

.form-section .help-text {
    font-size: 14px;
    color: #6B7280;
    margin-top: 5px;
}

.form-section .register-link {
    text-align: center;
    margin-top: 0px;
    color: #6B7280;
}

.form-section .register-link a {
    color: #438d9a;
    text-decoration: none;
    font-weight: 500;
}

.form-section .register-link a:hover {
    color: #7FCBDE;
}

/* Create Post specific styles */
.create-post-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.create-post-group {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    max-width: 600px; /* Add max-width constraint */
}

.create-post-group label {
    flex: 0 0 24px;
    color: #438d9a;
    font-size: 18px;
    padding-top: 8px;
}

.create-post-group .input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    max-width: calc(100% - 39px); /* 24px label + 15px gap */
}

.create-post-group textarea {
    min-height: 120px;
    resize: vertical;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure payment row maintains same width */
.create-post-payment-row {
    max-width: 600px;
}

/* Ensure datetime group maintains same width */
.create-post-datetime {
    max-width: 600px;
}

.create-post-group .help-text {
    font-size: 12px;
    color: #6B7280;
    margin-top: 4px;
}

/* Ensure all inputs have consistent height */
.create-post-group input,
.create-post-group select {
    height: 38px;
    padding: 8px 12px;
    box-sizing: border-box;
}

/* Custom styles for specific icons */
.create-post-group label[for$="header"] {
    font-size: 20px;  /* Slightly larger for the header icon */
}

.create-post-group label[for*="payment"] {
    font-size: 16px;  /* Slightly smaller for the payment icon */
}

.create-post-group .input-wrapper {
    flex: 1;
    min-width: 0;
}

/* Create Post Header and Bird styles */
.create-post-header {
    margin-bottom: 30px;
    position: relative;
}

.create-post-header-content {
    display: flex;
    align-items: flex-start;
    height: 80px;
}

.create-post-header .bird-container {
    position: absolute;
    left: 20px;
    top: -20px;
}

.create-post-header .bird {
    width: 120px;
    height: auto;
}

/* Post Create Speech Bubble */
.post-create-speech-bubble {
    position: absolute;
    background: #fff;
    border: 2px solid #438d9a;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 16px;
    color: #438d9a;
    white-space: nowrap;
    top: 28px;
    left: 130px;
}

.post-create-speech-bubble:before {
    content: '';
    position: absolute;
    left: -11px;
    top: 50%;
    transform: translateY(-50%);
    border-style: solid;
    border-width: 8px 12px 8px 0;
    border-color: transparent #438d9a transparent transparent;
}

.post-create-speech-bubble:after {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-style: solid;
    border-width: 6px 10px 6px 0;
    border-color: transparent #fff transparent transparent;
}

/* Create Post Payment styles */
.create-post-payment-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.create-post-payment-row .create-post-group {
    flex: 1;
    margin-bottom: 0;
}

.create-post-payment-amount, 
.create-post-payment-type {
    flex: 1;
    position: relative;
}

/* Adjust spacing for payment section */
.create-post-payment-row .create-post-group label {
    margin-top: 0;
}

/* Create Post Date Time styles */
.create-post-datetime {
    display: flex;
    gap: 20px;
}

.create-post-datetime .date-field {
    flex: 1;
}

.create-post-datetime .time-selector {
    flex: 1;
}

.create-post-time-inputs {
    display: flex;
    gap: 10px;
}

.create-post-time-inputs .time-select {
    flex: 2;
    min-width: 80px;
}

.create-post-time-inputs .ampm-select {
    flex: 1;
    min-width: 80px;
}

/* My Posts styles */
.my-posts-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.posts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.posts-header h1 {
    color: #438d9a;
    margin: 0;
}

.posts-per-page {
    display: flex;
    align-items: center;
    gap: 10px;
}

.posts-per-page select {
    padding: 8px;
    border: 1px solid #D9D9D9;
    border-radius: 4px;
    font-size: 14px;
}

.post-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.post-title {
    color: #438d9a;
    font-size: 20px;
    margin: 0;
}

.post-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.status-expiring-soon {
    background-color: #ffd700; 
    color: #000;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-expired {
    background-color: #f8d7da;
    color: #721c24;
}

.status-draft {
    background-color: #e2e3e5;
    color: #383d41;
}

.post-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: #6B7280;
    font-size: 14px;
}

.post-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.post-tag {
    background-color: #f4f4f4;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    color: #6B7280;
}

.post-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.post-action-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: background-color 0.3s ease;
}

.edit-btn {
    background-color: #438d9a;
    color: white;
}

.edit-btn:hover {
    background-color: #7FCBDE;
}

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

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

.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
}

.pagination-btn {
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #438d9a;
    background-color: white;
    border: 1px solid #438d9a;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(.disabled) {
    background-color: #438d9a;
    color: white;
}

.pagination-btn.active {
    background-color: #438d9a;
    color: white;
}

.pagination-btn.disabled {
    color: #6B7280;
    border-color: #D9D9D9;
    cursor: not-allowed;
}

/* Search Form Styles */
.search-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.search-filters {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.filter-section h3 {
    color: #438d9a;
    margin-bottom: 15px;
    font-size: 18px;
}

.tag-checkbox {
    display: none;
}

.tag-label {
    background-color: #f4f4f4;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.tag-checkbox:checked + .tag-label {
    background-color: #438d9a;
    color: white;
}

.search-button {
    background-color: #438d9a;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 16px;
    width: 100%;
}

.search-button:hover {
    background-color: #7FCBDE;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-section {
        padding: 20px;
    }

    .create-post-group {
        flex-direction: column;
        gap: 8px;
    }

    .create-post-group label {
        flex: none;
        padding-top: 0;
    }

    .create-post-header .bird-container {
        position: relative;
        left: 0;
        top: 0;
        margin-bottom: 20px;
    }
    
    .create-post-payment-row,
    .create-post-datetime {
        flex-direction: column;
        gap: 10px;
    }
    
    .create-post-time-inputs {
        flex-wrap: wrap;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .posts-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
}