.amp-page {
    width: 100%;
}

.amp-summary {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.amp-summary-card {
    padding: 11px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 7px;
    background: #fafafa;
}

.amp-summary-card span {
    display: block;
    margin-bottom: 5px;
    color: #777;
    font-size: 11px;
}

.amp-summary-card strong {
    font-size: 16px;
    font-weight: 600;
}

#amp-cloudflare-state {
    font-size: 12px;
}

#amp-cloudflare-state.is-ready {
    color: #176b32;
}

.amp-panel,
.amp-editor {
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 7px;
    background: #fafafa;
}

.amp-editor {
    margin-top: 16px;
}

.amp-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.amp-panel-head > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.amp-panel-head strong {
    font-size: 13px;
    font-weight: 600;
}

.amp-panel-head span {
    color: #777;
    font-size: 11px;
}

.amp-form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.amp-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 11px;
    font-weight: 500;
}

.amp-form-grid label small {
    color: #777;
    font-size: 10px;
    font-weight: 400;
}

.amp-form-grid .amp-wide {
    grid-column: 1 / -1;
}

.amp-form-grid input,
.amp-form-grid select {
    height: 34px;
    padding: 0 9px;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
}

.amp-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.amp-editor-top-actions {
    margin-bottom: 10px;
}

.amp-source-editor {
    width: 100%;
    min-height: 460px;
    box-sizing: border-box;
    padding: 12px;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    resize: vertical;
    background: #fff;
    font-family:
        Consolas,
        Monaco,
        "Courier New",
        monospace;
    font-size: 12px;
    line-height: 1.5;
    tab-size: 4;
}

.amp-source-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 9px;
}

.amp-validation-result {
    max-height: 300px;
    margin: 12px 0 0;
    padding: 10px;
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    font-family:
        Consolas,
        Monaco,
        monospace;
    font-size: 11px;
    white-space: pre-wrap;
}

.amp-primary {
    font-size: 13px;
    font-weight: 500;
}

.amp-secondary {
    margin-top: 3px;
    color: #777;
    font-size: 11px;
}

.amp-url {
    max-width: 300px;
    font-family:
        Consolas,
        Monaco,
        monospace;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.amp-url a {
    color: inherit;
}

.amp-badge {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    padding: 3px 7px;
    border: 1px solid #ddd;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 500;
}

.amp-good {
    border-color: #a8ddb9;
    background: #e9f9ee;
    color: #176b32;
}

.amp-wait {
    border-color: #e3d19e;
    background: #fff8df;
    color: #806100;
}

.amp-bad {
    border-color: #efb4b4;
    background: #fff0f0;
    color: #b51d1d;
}

.amp-muted {
    background: #f3f3f3;
    color: #666;
}

.amp-actions {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    white-space: nowrap;
}

.amp-table th:last-child,
.amp-table td:last-child {
    text-align: right;
}

.amp-message {
    margin-top: 12px;
    padding: 9px 11px;
    border: 1px solid #b9dfc5;
    border-radius: 6px;
    background: #eefaf2;
    color: #176b32;
    font-size: 12px;
}

.amp-message.is-error {
    border-color: #efb4b4;
    background: #fff0f0;
    color: #b51d1d;
}

@media (max-width: 1000px) {

    .amp-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .amp-table {
        min-width: 1200px;
    }
}

@media (max-width: 700px) {

    .amp-form-grid {
        grid-template-columns: 1fr;
    }

    .amp-form-grid .amp-wide {
        grid-column: auto;
    }
}

/* ==========================================================
   QRLON_AMP_FINAL_LAYOUT_V1
   Keep Status and Action columns separated.
   ========================================================== */

.amp-page .qrlon-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.amp-table {
    width: 100%;
    min-width: 1260px;
    table-layout: fixed;
}

.amp-table th,
.amp-table td {
    vertical-align: middle;
}

/* Project */
.amp-table th:nth-child(1),
.amp-table td:nth-child(1) {
    width: 170px;
}

/* Pages URL */
.amp-table th:nth-child(2),
.amp-table td:nth-child(2) {
    width: 225px;
}

/* Canonical */
.amp-table th:nth-child(3),
.amp-table td:nth-child(3) {
    width: 225px;
}

/* Validation */
.amp-table th:nth-child(4),
.amp-table td:nth-child(4) {
    width: 105px;
}

/* Deployment */
.amp-table th:nth-child(5),
.amp-table td:nth-child(5) {
    width: 115px;
}

/* Status */
.amp-table th:nth-child(6),
.amp-table td:nth-child(6) {
    width: 90px;
}

/* Action */
.amp-table th:nth-child(7),
.amp-table td:nth-child(7) {
    width: 300px;
    min-width: 300px;
    text-align: left;
}

.amp-table .amp-url {
    max-width: none;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.amp-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 6px;

    min-width: 280px;
    white-space: nowrap;
}

.amp-actions .qrlon-btn {
    flex: 0 0 auto;
}

@media (max-width: 1000px) {

    .amp-table {
        min-width: 1260px;
    }
}

/* QRLON_AMP_FINAL_LAYOUT_V1 END */
