/**
 * WooCommerce Button Text Changer
 *
 * Admin Styles
 */

/* =========================================================
   PAGE WRAPPER
   ========================================================= */

.wbtc-admin-wrap {
    max-width: 1100px;
    margin: 20px 20px 40px 0;
}


/* =========================================================
   HEADER
   ========================================================= */

.wbtc-admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    padding: 24px 28px;

    margin-bottom: 20px;

    background: #ffffff;

    border: 1px solid #dcdcde;

    border-radius: 8px;

    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}


.wbtc-admin-header-content {
    flex: 1;
}


.wbtc-admin-title {
    margin: 0 0 6px;

    font-size: 24px;

    line-height: 1.3;

    font-weight: 600;

    color: #1d2327;
}


.wbtc-admin-description {
    margin: 0;

    font-size: 14px;

    line-height: 1.6;

    color: #646970;
}


.wbtc-admin-version {
    display: inline-flex;

    align-items: center;

    padding: 5px 9px;

    border-radius: 4px;

    background: #f0f0f1;

    color: #50575e;

    font-size: 12px;

    font-weight: 500;

    white-space: nowrap;
}


/* =========================================================
   STATUS
   ========================================================= */

.wbtc-status-card {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 18px 22px;

    margin-bottom: 20px;

    background: #ffffff;

    border: 1px solid #dcdcde;

    border-radius: 8px;
}


.wbtc-status-content {
    display: flex;

    align-items: center;

    gap: 12px;
}


.wbtc-status-dot {
    width: 10px;

    height: 10px;

    border-radius: 50%;

    background: #00a32a;

    box-shadow: 0 0 0 4px rgba(0, 163, 42, 0.10);
}


.wbtc-status-title {
    margin: 0;

    font-size: 14px;

    font-weight: 600;

    color: #1d2327;
}


.wbtc-status-description {
    margin: 2px 0 0;

    font-size: 12px;

    color: #646970;
}


/* =========================================================
   SETTINGS CARD
   ========================================================= */

.wbtc-settings-card {
    margin-bottom: 20px;

    background: #ffffff;

    border: 1px solid #dcdcde;

    border-radius: 8px;

    overflow: hidden;

    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}


.wbtc-settings-card-header {
    padding: 18px 22px;

    border-bottom: 1px solid #dcdcde;

    background: #f6f7f7;
}


.wbtc-settings-card-title {
    margin: 0;

    font-size: 16px;

    line-height: 1.4;

    font-weight: 600;

    color: #1d2327;
}


.wbtc-settings-card-description {
    margin: 5px 0 0;

    font-size: 13px;

    line-height: 1.5;

    color: #646970;
}


.wbtc-settings-card-body {
    padding: 22px;
}


/* =========================================================
   FORM TABLE
   ========================================================= */

.wbtc-settings-table {
    width: 100%;

    border-collapse: collapse;
}


.wbtc-settings-table th,
.wbtc-settings-table td {
    padding: 18px 10px;

    vertical-align: top;

    border-bottom: 1px solid #f0f0f1;
}


.wbtc-settings-table tr:last-child th,
.wbtc-settings-table tr:last-child td {
    border-bottom: 0;
}


.wbtc-settings-table th {
    width: 30%;

    text-align: left;

    font-weight: 600;

    color: #1d2327;
}


.wbtc-settings-table td {
    width: 70%;
}


/* =========================================================
   FIELD LABEL
   ========================================================= */

.wbtc-field-label {
    display: block;

    margin-bottom: 6px;

    font-size: 14px;

    font-weight: 600;

    color: #1d2327;
}


.wbtc-field-description {
    margin-top: 6px;

    font-size: 12px;

    line-height: 1.5;

    color: #646970;
}


/* =========================================================
   TEXT INPUT
   ========================================================= */

.wbtc-text-input {
    width: 100%;

    max-width: 500px;

    min-height: 40px;

    padding: 7px 11px;

    border: 1px solid #8c8f94;

    border-radius: 4px;

    background: #ffffff;

    color: #1d2327;

    font-size: 14px;

    line-height: 1.5;

    box-sizing: border-box;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.wbtc-text-input:focus {
    border-color: #2271b1;

    box-shadow:
        0 0 0 1px #2271b1;

    outline: none;
}


.wbtc-text-input::placeholder {
    color: #8c8f94;
}


/* =========================================================
   ENABLE TOGGLE
   ========================================================= */

.wbtc-toggle-wrapper {
    display: flex;

    align-items: center;

    gap: 12px;
}


.wbtc-toggle {
    position: relative;

    display: inline-block;

    width: 46px;

    height: 24px;
}


.wbtc-toggle input {
    position: absolute;

    opacity: 0;

    width: 1px;

    height: 1px;
}


.wbtc-toggle-slider {
    position: absolute;

    inset: 0;

    cursor: pointer;

    background: #8c8f94;

    border-radius: 24px;

    transition:
        background-color 0.2s ease;
}


.wbtc-toggle-slider::before {
    content: "";

    position: absolute;

    width: 18px;

    height: 18px;

    left: 3px;

    top: 3px;

    background: #ffffff;

    border-radius: 50%;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.25);

    transition:
        transform 0.2s ease;
}


.wbtc-toggle input:checked + .wbtc-toggle-slider {
    background: #2271b1;
}


.wbtc-toggle input:checked + .wbtc-toggle-slider::before {
    transform: translateX(22px);
}


.wbtc-toggle input:focus + .wbtc-toggle-slider {
    box-shadow:
        0 0 0 2px #ffffff,
        0 0 0 4px #2271b1;
}


.wbtc-toggle-text {
    font-size: 13px;

    font-weight: 500;

    color: #1d2327;
}


/* =========================================================
   BUTTON PREVIEW
   ========================================================= */

.wbtc-preview-box {
    margin-top: 20px;

    padding: 22px;

    border: 1px dashed #c3c4c7;

    border-radius: 6px;

    background: #f6f7f7;
}


.wbtc-preview-title {
    margin: 0 0 14px;

    font-size: 13px;

    font-weight: 600;

    color: #1d2327;
}


.wbtc-preview-button {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 42px;

    padding: 10px 22px;

    border: 1px solid #2271b1;

    border-radius: 4px;

    background: #2271b1;

    color: #ffffff;

    font-size: 14px;

    font-weight: 600;

    line-height: 1.4;

    cursor: pointer;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}


.wbtc-preview-button:hover {
    background: #135e96;

    border-color: #135e96;

    color: #ffffff;

    transform: translateY(-1px);
}


/* =========================================================
   BUTTON GRID
   ========================================================= */

.wbtc-button-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 16px;
}


.wbtc-button-setting {
    padding: 16px;

    border: 1px solid #dcdcde;

    border-radius: 6px;

    background: #ffffff;
}


.wbtc-button-setting:hover {
    border-color: #b2b2b2;
}


/* =========================================================
   SAVE BUTTON
   ========================================================= */

.wbtc-save-row {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-top: 20px;
}


.wbtc-save-row .button-primary {
    min-height: 40px;

    padding: 5px 18px;

    border-radius: 4px;

    font-weight: 600;
}


.wbtc-save-message {
    display: none;

    font-size: 13px;

    font-weight: 500;

    color: #00a32a;
}


/* =========================================================
   RESET BUTTON
   ========================================================= */

.wbtc-reset-button {
    color: #b32d2e !important;

    border-color: #b32d2e !important;

    background: #ffffff !important;
}


.wbtc-reset-button:hover {
    color: #ffffff !important;

    background: #b32d2e !important;

    border-color: #b32d2e !important;
}


/* =========================================================
   NOTICE
   ========================================================= */

.wbtc-admin-notice {
    position: relative;

    margin: 0 0 20px;

    padding: 12px 16px;

    border-left: 4px solid #2271b1;

    background: #ffffff;

    box-shadow:
        0 1px 1px rgba(0, 0, 0, 0.04);
}


.wbtc-admin-notice p {
    margin: 0;

    font-size: 13px;

    line-height: 1.5;
}


.wbtc-admin-notice.success {
    border-left-color: #00a32a;
}


.wbtc-admin-notice.warning {
    border-left-color: #dba617;
}


.wbtc-admin-notice.error {
    border-left-color: #d63638;
}


/* =========================================================
   ELEMENTOR INFO BOX
   ========================================================= */

.wbtc-elementor-info {
    display: flex;

    gap: 14px;

    padding: 16px;

    margin-top: 20px;

    border: 1px solid #c3c4c7;

    border-radius: 6px;

    background: #f6f7f7;
}


.wbtc-elementor-info-icon {
    flex: 0 0 auto;

    width: 36px;

    height: 36px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: #2271b1;

    color: #ffffff;
}


.wbtc-elementor-info-content {
    flex: 1;
}


.wbtc-elementor-info-title {
    margin: 0 0 5px;

    font-size: 14px;

    font-weight: 600;

    color: #1d2327;
}


.wbtc-elementor-info-text {
    margin: 0;

    font-size: 13px;

    line-height: 1.5;

    color: #646970;
}


/* =========================================================
   SHORTCODE / CODE
   ========================================================= */

.wbtc-code {
    display: inline-block;

    padding: 3px 7px;

    border-radius: 3px;

    background: #f0f0f1;

    color: #1d2327;

    font-family:
        Consolas,
        Monaco,
        monospace;

    font-size: 12px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 782px) {

    .wbtc-admin-wrap {
        margin-right: 10px;
    }


    .wbtc-admin-header {
        flex-direction: column;

        align-items: flex-start;
    }


    .wbtc-status-card {
        flex-direction: column;

        align-items: flex-start;
    }


    .wbtc-settings-table th,
    .wbtc-settings-table td {
        display: block;

        width: 100%;

        box-sizing: border-box;
    }


    .wbtc-settings-table th {
        padding-bottom: 6px;

        border-bottom: 0;
    }


    .wbtc-settings-table td {
        padding-top: 0;
    }


    .wbtc-button-grid {
        grid-template-columns: 1fr;
    }


    .wbtc-text-input {
        max-width: 100%;
    }

}


@media (max-width: 480px) {

    .wbtc-admin-header {
        padding: 18px;
    }


    .wbtc-settings-card-header,
    .wbtc-settings-card-body {
        padding: 16px;
    }


    .wbtc-admin-title {
        font-size: 20px;
    }


    .wbtc-preview-button {
        width: 100%;
    }

}


/* =========================================================
   ACCESSIBILITY
   ========================================================= */

.wbtc-admin-wrap button:focus,
.wbtc-admin-wrap input:focus {
    outline-offset: 2px;
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .wbtc-preview-button,
    .wbtc-toggle-slider,
    .wbtc-toggle-slider::before,
    .wbtc-text-input {

        transition: none !important;
    }

}

/* =========================================
   WBTC Action Buttons
   ========================================= */

.wbtc-actions-row {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 24px;
	margin-bottom: 20px;
	flex-wrap: nowrap;
}


/* Individual forms */

.wbtc-save-form,
.wbtc-reset-form {
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
}


/* Buttons */

.wbtc-actions-row .button {
	margin: 0 !important;
	min-height: 40px;
	height: 40px;
	padding: 0 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	font-size: 14px;
	font-weight: 600;
	box-sizing: border-box;
}


/* Save button */

.wbtc-save-button {
	min-width: 190px;
}


/* Reset button */

.wbtc-reset-button {
	min-width: 140px;
}


/* Hover */

.wbtc-actions-row .button {
	transition:
		background-color 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease,
		box-shadow 0.2s ease;
}


/* Responsive */

@media (max-width: 600px) {

	.wbtc-actions-row {
		flex-wrap: wrap;
		gap: 10px;
	}

	.wbtc-actions-row .button {
		width: auto;
	}

}