/* ====================================================
   GREYHOUNDS CUSTOM BUTTONS
   Based on Bootstrap button structure with custom colors
   Naming convention: btn-[variant]-gh for Greyhounds-specific buttons
   ==================================================== */

:root {
    --gh-primary: #b61b27;           /* Greyhounds red */
    --gh-primary-hover: #661809;     /* Dark red */
    --gh-primary-active: #8b1420;    /* Medium red */
    --gh-secondary: #4a4a4a;         /* Dark grey */
    --gh-secondary-hover: #2a2a2a;   /* Darker grey */
    --gh-light-grey: #ededed;        /* Light grey background */
    --gh-medium-grey: #909090;       /* Medium grey text */
    --gh-white: #ffffff;
}

/* ====================================================
   PRIMARY BUTTON - Greyhounds Red (Standard Size)
   ==================================================== */
.btn-primary-gh {
    width: auto;
    height: 50px;
    border-radius: 4px;
    background: var(--gh-primary);
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: var(--gh-white);
    text-transform: uppercase;
    border: 1px solid var(--gh-primary);
    transition: all 0.5s;
    line-height: 36px;
    padding: 0.375rem 1.65rem;
    cursor: pointer;
    display: inline-block;
}

.btn-primary-gh:hover {
    background: var(--gh-primary-hover);
    border: 1px solid var(--gh-primary-hover);
    color: var(--gh-white);
    text-decoration: none;
}

.btn-primary-gh:focus {
    box-shadow: none;
    outline: none;
}

.btn-primary-gh:active {
    background: var(--gh-primary-active);
    border: 1px solid var(--gh-primary-active);
}

.btn-primary-gh:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ====================================================
   PRIMARY BUTTON - Small Variant
   ==================================================== */
.btn-primary-sm-gh {
    width: auto;
    height: 40px;
    border-radius: 4px;
    background: var(--gh-primary);
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: var(--gh-white);
    text-transform: uppercase;
    border: 1px solid var(--gh-primary);
    transition: all 0.5s;
    line-height: 28px;
    padding: 0.25rem 1.3rem;
    cursor: pointer;
    display: inline-block;
}

.btn-primary-sm-gh:hover {
    background: var(--gh-primary-hover);
    border: 1px solid var(--gh-primary-hover);
    color: var(--gh-white);
    text-decoration: none;
}

.btn-primary-sm-gh:focus {
    box-shadow: none;
    outline: none;
}

.btn-primary-sm-gh:active {
    background: var(--gh-primary-active);
    border: 1px solid var(--gh-primary-active);
}

.btn-primary-sm-gh:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ====================================================
   SECONDARY BUTTON - Dark Grey (Standard Size)
   ==================================================== */
.btn-secondary-gh {
    width: auto;
    height: 50px;
    border-radius: 4px;
    background: var(--gh-secondary);
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: var(--gh-white);
    text-transform: uppercase;
    border: 1px solid var(--gh-secondary);
    transition: all 0.5s;
    line-height: 36px;
    padding: 0.375rem 1.65rem;
    cursor: pointer;
    display: inline-block;
}

.btn-secondary-gh:hover {
    background: var(--gh-secondary-hover);
    border: 1px solid var(--gh-secondary-hover);
    color: var(--gh-white);
    text-decoration: none;
}

.btn-secondary-gh:focus {
    box-shadow: none;
    outline: none;
}

.btn-secondary-gh:active {
    background: var(--gh-secondary-hover);
    border: 1px solid var(--gh-secondary-hover);
}

.btn-secondary-gh:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ====================================================
   SECONDARY BUTTON - Small Variant
   ==================================================== */
.btn-secondary-sm-gh {
    width: auto;
    height: 40px;
    border-radius: 4px;
    background: var(--gh-secondary);
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: var(--gh-white);
    text-transform: uppercase;
    border: 1px solid var(--gh-secondary);
    transition: all 0.5s;
    line-height: 28px;
    padding: 0.25rem 1.3rem;
    cursor: pointer;
    display: inline-block;
}

.btn-secondary-sm-gh:hover {
    background: var(--gh-secondary-hover);
    border: 1px solid var(--gh-secondary-hover);
    color: var(--gh-white);
    text-decoration: none;
}

.btn-secondary-sm-gh:focus {
    box-shadow: none;
    outline: none;
}

.btn-secondary-sm-gh:active {
    background: var(--gh-secondary-hover);
    border: 1px solid var(--gh-secondary-hover);
}

.btn-secondary-sm-gh:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ====================================================
   OUTLINE PRIMARY BUTTON - Transparent with Red Border
   ==================================================== */
.btn-outline-primary-gh {
    width: auto;
    height: 50px;
    border-radius: 4px;
    background: transparent;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: var(--gh-primary);
    text-transform: uppercase;
    border: 2px solid var(--gh-primary);
    transition: all 0.5s;
    line-height: 36px;
    padding: 0.375rem 1.65rem;
    cursor: pointer;
    display: inline-block;
}

.btn-outline-primary-gh:hover {
    background: var(--gh-primary);
    border: 2px solid var(--gh-primary);
    color: var(--gh-white);
    text-decoration: none;
}

.btn-outline-primary-gh:focus {
    box-shadow: none;
    outline: none;
}

.btn-outline-primary-gh:active {
    background: var(--gh-primary-hover);
    border: 2px solid var(--gh-primary-hover);
    color: var(--gh-white);
}

.btn-outline-primary-gh:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ====================================================
   OUTLINE PRIMARY BUTTON - Small Variant
   ==================================================== */
.btn-outline-primary-sm-gh {
    width: auto;
    height: 40px;
    border-radius: 4px;
    background: transparent;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: var(--gh-primary);
    text-transform: uppercase;
    border: 2px solid var(--gh-primary);
    transition: all 0.5s;
    line-height: 28px;
    padding: 0.25rem 1.3rem;
    cursor: pointer;
    display: inline-block;
}

.btn-outline-primary-sm-gh:hover {
    background: var(--gh-primary);
    border: 2px solid var(--gh-primary);
    color: var(--gh-white);
    text-decoration: none;
}

.btn-outline-primary-sm-gh:focus {
    box-shadow: none;
    outline: none;
}

/* ====================================================
   OUTLINE SECONDARY BUTTON - Transparent with Grey Border
   ==================================================== */
.btn-outline-secondary-gh {
    width: auto;
    height: 50px;
    border-radius: 4px;
    background: transparent;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: var(--gh-secondary);
    text-transform: uppercase;
    border: 2px solid var(--gh-secondary);
    transition: all 0.5s;
    line-height: 36px;
    padding: 0.375rem 1.65rem;
    cursor: pointer;
    display: inline-block;
}

.btn-outline-secondary-gh:hover {
    background: var(--gh-secondary);
    border: 2px solid var(--gh-secondary);
    color: var(--gh-white);
    text-decoration: none;
}

.btn-outline-secondary-gh:focus {
    box-shadow: none;
    outline: none;
}

.btn-outline-secondary-gh:active {
    background: var(--gh-secondary-hover);
    border: 2px solid var(--gh-secondary-hover);
    color: var(--gh-white);
}

.btn-outline-secondary-gh:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ====================================================
   OUTLINE SECONDARY BUTTON - Small Variant
   ==================================================== */
.btn-outline-secondary-sm-gh {
    width: auto;
    height: 40px;
    border-radius: 4px;
    background: transparent;
    font-family: "Roboto", sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: var(--gh-secondary);
    text-transform: uppercase;
    border: 2px solid var(--gh-secondary);
    transition: all 0.5s;
    line-height: 28px;
    padding: 0.25rem 1.3rem;
    cursor: pointer;
    display: inline-block;
}

.btn-outline-secondary-sm-gh:hover {
    background: var(--gh-secondary);
    border: 2px solid var(--gh-secondary);
    color: var(--gh-white);
    text-decoration: none;
}

.btn-outline-secondary-sm-gh:focus {
    box-shadow: none;
    outline: none;
}

/* ====================================================
   DANGER BUTTON - For delete/destructive actions
   ==================================================== */
.btn-danger-gh {
    width: auto;
    height: 50px;
    border-radius: 4px;
    background: #dc3545;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: var(--gh-white);
    text-transform: uppercase;
    border: 1px solid #dc3545;
    transition: all 0.5s;
    line-height: 36px;
    padding: 0.375rem 1.65rem;
    cursor: pointer;
    display: inline-block;
}

.btn-danger-gh:hover {
    background: #c82333;
    border: 1px solid #c82333;
    color: var(--gh-white);
    text-decoration: none;
}

.btn-danger-gh:focus {
    box-shadow: none;
    outline: none;
}

.btn-danger-gh:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ====================================================
   SUCCESS BUTTON - For success/confirmation actions
   ==================================================== */
.btn-success-gh {
    width: auto;
    height: 50px;
    border-radius: 4px;
    background: #28a745;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: var(--gh-white);
    text-transform: uppercase;
    border: 1px solid #28a745;
    transition: all 0.5s;
    line-height: 36px;
    padding: 0.375rem 1.65rem;
    cursor: pointer;
    display: inline-block;
}

.btn-success-gh:hover {
    background: #218838;
    border: 1px solid #218838;
    color: var(--gh-white);
    text-decoration: none;
}

.btn-success-gh:focus {
    box-shadow: none;
    outline: none;
}

.btn-success-gh:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ====================================================
   WARNING BUTTON - For warning/caution actions
   ==================================================== */
.btn-warning-gh {
    width: auto;
    height: 50px;
    border-radius: 4px;
    background: #ffc107;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    color: #212529;
    text-transform: uppercase;
    border: 1px solid #ffc107;
    transition: all 0.5s;
    line-height: 36px;
    padding: 0.375rem 1.65rem;
    cursor: pointer;
    display: inline-block;
}

.btn-warning-gh:hover {
    background: #e0a800;
    border: 1px solid #e0a800;
    color: #212529;
    text-decoration: none;
}

.btn-warning-gh:focus {
    box-shadow: none;
    outline: none;
}

.btn-warning-gh:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

/* ====================================================
   LINK BUTTON - Text button with no background
   ==================================================== */
.btn-link-gh {
    padding: 0;
    font-family: "Roboto", sans-serif;
    font-size: 16px;
    font-weight: normal;
    color: var(--gh-primary);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-link-gh:hover {
    color: var(--gh-primary-hover);
    text-decoration: underline;
}

.btn-link-gh:focus {
    outline: none;
}

/* ====================================================
   ICON BUTTONS - Buttons with icons
   ==================================================== */
.btn-icon-gh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-icon-gh i,
.btn-icon-gh .fa {
    font-size: 1.1em;
}

/* ====================================================
   BLOCK BUTTONS - Full width
   ==================================================== */
.btn-block-gh {
    display: block;
    width: 100%;
}

/* ====================================================
   BUTTON GROUPS
   ==================================================== */
.btn-group-gh {
    display: inline-flex;
    gap: 0.5rem;
}

.btn-group-gh .btn-primary-gh,
.btn-group-gh .btn-secondary-gh,
.btn-group-gh .btn-outline-primary-gh,
.btn-group-gh .btn-outline-secondary-gh {
    margin: 0;
}

/* ====================================================
   RESPONSIVE ADJUSTMENTS
   ==================================================== */
@media (max-width: 767px) {
    /* Make all standard buttons smaller on mobile */
    .btn-primary-gh,
    .btn-secondary-gh,
    .btn-outline-primary-gh,
    .btn-outline-secondary-gh,
    .btn-danger-gh,
    .btn-success-gh,
    .btn-warning-gh {
        height: 40px;
        font-size: 14px;
        line-height: 28px;
        padding: 0.25rem 1.3rem;
    }
    
    /* Full width buttons on mobile by default */
    .btn-primary-gh,
    .btn-secondary-gh,
    .btn-danger-gh,
    .btn-success-gh,
    .btn-warning-gh {
        width: 100%;
        display: block;
        margin-bottom: 0.5rem;
    }
    
    /* Keep outline buttons auto-width on mobile */
    .btn-outline-primary-gh,
    .btn-outline-secondary-gh {
        width: auto;
    }
}

/* ====================================================
   LOADING STATE
   ==================================================== */
.btn-loading-gh {
    position: relative;
    pointer-events: none;
    opacity: 0.65;
}

.btn-loading-gh::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid var(--gh-white);
    border-radius: 50%;
    border-top-color: transparent;
    animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}
