/* webs-pbn-tracker.css */

#webs-pbn-tracker-app {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #f9fafb;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #374151;
    direction: rtl;
}

/* Input Section */
.webs-pbn-input-section {
    background-color: #fef3c7;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #fcd34d;
}

.webs-pbn-input-section h3 {
    margin: 0 0 15px 0;
    color: #92400e;
    font-size: 16px;
}

.webs-pbn-input-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.webs-pbn-input-row label {
    min-width: 100px;
    font-weight: 500;
    color: #78350f;
}

.webs-pbn-input-row input,
.webs-pbn-input-row textarea {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d97706 !important;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff !important;
}

.webs-pbn-input-row input:focus,
.webs-pbn-input-row textarea:focus {
    outline: none !important;
    border-color: #b45309 !important;
    box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2) !important;
}

.webs-pbn-input-row textarea#pbn-notes {
    border: 1px solid #d97706 !important;
    background-color: #fff !important;
    resize: vertical;
}

.webs-pbn-input-row textarea#pbn-notes:focus {
    border-color: #b45309 !important;
}

.webs-pbn-save-input-btn {
    background-color: #d97706;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 5px;
}

.webs-pbn-save-input-btn:hover {
    background-color: #b45309;
}

/* Overall Status */
.webs-pbn-overall-status {
    background-color: #e0f2fe;
    padding: 3px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #bfdbfe;
    display: flex;
}

.webs-pbn-overall-status p {
    margin: 5px 0;
    font-size: 16px;
    color: #1e40af;
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center;
    direction: rtl;
}

.webs-pbn-overall-status strong {
    color: #1c3d8a;
}

/* Sections */
.webs-pbn-section {
    margin-bottom: 25px;
    border-radius: 10px;
    overflow: hidden;
}

.webs-pbn-section-title {
    margin: 0;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    color: white;
}

/* Section Colors */
.section-preparation {
    border: 2px solid #8b5cf6;
}
.section-preparation .webs-pbn-section-title {
    background-color: #8b5cf6;
}

.section-publish {
    border: 2px solid #10b981;
}
.section-publish .webs-pbn-section-title {
    background-color: #10b981;
}

.section-report {
    border: 2px solid #f59e0b;
}
.section-report .webs-pbn-section-title {
    background-color: #f59e0b;
}

/* Steps List */
.webs-pbn-steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: #ffffff;
}

.webs-pbn-step {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 5px 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
}

.webs-pbn-step:last-child {
    border-bottom: none;
}

.webs-pbn-step.pending {
    border-right: 5px solid #fcd34d;
}

.webs-pbn-step.active {
    border-right: 5px solid #3b82f6;
    background-color: #eff6ff;
}

.webs-pbn-step.completed {
    border-right: 5px solid #34d399;
    background-color: #f0fdf4;
}

.webs-pbn-step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 65%;
}

.webs-pbn-step-number {
    font-weight: 400;
    font-size: 16px;
    color: #4b5563;
    margin-left: 10px;
    min-width: 25px;
    text-align: right;
}

.webs-pbn-step-name {
    font-weight: 400;
    font-size: 16px;
    color: #1f2937;
    flex-grow: 1;
    margin-left: 10px;
}

.webs-pbn-step-buttons {
    display: flex;
    gap: 8px;
}

.webs-pbn-start-button,
.webs-pbn-start-again-button {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 3px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.webs-pbn-start-button:hover:not(:disabled),
.webs-pbn-start-again-button:hover:not(:disabled) {
    background-color: #2563eb;
    transform: translateY(-1px);
}

.webs-pbn-start-button:disabled,
.webs-pbn-start-again-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

.webs-pbn-start-again-button {
    background-color: #e5e5e5;
    color: #374151;
}

.webs-pbn-start-again-button:hover:not(:disabled) {
    background-color: #d1d5db;
}

.webs-pbn-step-details p {
    margin: 3px 0;
    font-size: 0.95em;
    color: #4b5563;
}

/* Controls */
.webs-pbn-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.webs-pbn-controls button {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 600;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#webs-pbn-finish-button {
    background-color: #10b981;
    color: white;
}

#webs-pbn-finish-button:hover:not(:disabled) {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#webs-pbn-finish-button:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.7;
}

#webs-pbn-reset-button {
    background-color: #ef4444;
    color: white;
}

#webs-pbn-reset-button:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Message */
.webs-pbn-message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.webs-pbn-message.success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.webs-pbn-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Recent Reports Section */
.webs-pbn-recent-reports {
    margin-top: 30px;
    padding: 15px 20px;
    background-color: #f3f4f6;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.webs-pbn-recent-reports h3 {
    margin: 0 0 15px 0;
    color: #374151;
    font-size: 16px;
    border-bottom: 1px solid #d1d5db;
    padding-bottom: 10px;
}

.webs-pbn-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.webs-pbn-recent-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

.webs-pbn-recent-list li:last-child {
    border-bottom: none;
}

.webs-pbn-recent-list a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.webs-pbn-recent-list a:hover {
    text-decoration: underline;
}

.report-duration {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.no-reports {
    color: #6b7280;
    text-align: center;
    padding: 20px 0;
}

/* New Report Button */
.webs-pbn-new-report-btn {
    display: inline-block;
    background-color: #7c3aed;
    color: white !important;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 16px;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 4px 8px rgba(124, 58, 237, 0.3);
}

.webs-pbn-new-report-btn:hover {
    background-color: #6d28d9;
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 600px) {
    #webs-pbn-tracker-app {
        padding: 15px;
        margin: 10px;
    }

    .webs-pbn-input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .webs-pbn-input-row label {
        margin-bottom: 5px;
    }

    .webs-pbn-step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .webs-pbn-step-number {
        margin-bottom: 5px;
        text-align: right;
    }

    .webs-pbn-step-name {
        margin-left: 0;
        margin-bottom: 5px;
    }

    .webs-pbn-step-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    .webs-pbn-controls {
        flex-direction: column;
        gap: 10px;
    }

    .webs-pbn-controls button {
        width: 100%;
    }

    .webs-pbn-recent-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}