/*
Copyright 2019 BarD Software s.r.o

This file is part of GanttProject, an open-source project management tool.

GanttProject is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

GanttProject is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GanttProject.  If not, see <http://www.gnu.org/licenses/>.
*/

@import "theme";
@import "dialogs";

.btn-attention {
    -fx-background-color: $gp-orange;
    -fx-border-color: transparent;
    -fx-border-radius: 0;
    -fx-text-fill: $gp-dark-gray;
    /*    -fx-font-size: 110%;*/
    -fx-font-weight: bold;
    -fx-padding: 0.75ex 2em;
    -fx-cursor: hand;

    &.secondary {
        -fx-background-color: transparent;
        -fx-border-color: $gp-orange;

        &:hover, &:focused {
            -fx-background-color: derive($gp-orange, 10%);
        }
    }
    &:hover, &:focused {
        -fx-effect: dropshadow(gaussian, $gp-light-gray, 4, 0, 0, 4);
        -fx-background-color: derive($gp-orange, 10%);
        -fx-text-fill: derive($gp-dark-gray, -10%);
    }

    &:disabled {
        -fx-opacity: 0.5;
        -fx-cursor: default;
    }

    &:pressed {
        -fx-effect: none;
        -fx-background-color: derive($gp-orange, 10%);
        -fx-text-fill: derive($gp-dark-gray, -10%);
    }
}

.btn-regular {
  -fx-background-color: $gp-light-gray;
  -fx-border-color: $gp-dark-gray;
  -fx-border-radius: 0;
  -fx-text-fill: $gp-dark-gray;
  /*    -fx-font-size: 110%;*/
  -fx-font-weight: bold;
  -fx-padding: 0.75ex 2em;
  -fx-cursor: hand;

  &.small {
    -fx-padding: 0.4ex 1em;
    -fx-font-size: 75%;
  }
  &.secondary {
    -fx-background-color: transparent;
    -fx-border-color: derive($gp-light-gray, -20%);

    &:hover, &:focused {
      -fx-background-color: derive($gp-light-gray, 10%);
      -fx-border-color: $gp-medium-gray;
      -fx-border-width: 1;
    }
  }
  &:hover, &:focused {
    -fx-effect: dropshadow(gaussian, $gp-light-gray, 4, 0, 0, 4);
    -fx-background-color: derive($gp-light-gray, 10%);
    -fx-text-fill: derive($gp-dark-gray, -10%);
  }

  &:disabled {
    -fx-opacity: 0.5;
    -fx-cursor: default;
  }

  &:pressed {
    -fx-effect: none;
    -fx-background-color: derive($gp-light-gray, 10%);
    -fx-text-fill: derive($gp-dark-gray, -10%);
  }
}

.border-etched {
    -fx-border-base: gray;
    -fx-border-shadow: white;
    -fx-light-border: derive(-fx-border-base, 25%);
    -fx-border-color: -fx-light-border -fx-border-base -fx-border-base -fx-light-border;
    -fx-border-insets: 0 1 1 0;
    -fx-background-color: -fx-border-shadow, -fx-background;
    -fx-background-insets: 1 0 0 1, 2;
    -fx-padding: 2;
}

.dlg .layers {
    -fx-padding: 0;
}

.dlg {
    -fx-background-color: transparent;

    .button-pane {
      @include dialog-button-pane();
    }
}

.dlg .content-pane > * {
    -fx-background-color: transparent;
}

.dlg Button {
    -fx-text-fill: $gp-dark-gray;
    -fx-cursor: hand;
    -fx-padding: 0.75ex 2em;
    -fx-border-insets: 0;
    -fx-background-insets: 0;
}

.dlg Button:hover {
    -fx-effect: dropshadow(gaussian, $gp-light-gray, 4, 0, 0, 4);
}

.dlg Button:pressed {
    -fx-effect: none;
}

.dlg Button:focused {
    -fx-border-color: #26C7E0;
}

//.dlg .btn {
//    -fx-background-color: white;
//    -fx-border-color: $gp-light-gray;
//}

.dlg .button-bar {
  -fx-padding: 0 0.833em 0.833em 0.833em;
  //-fx-border-color: red;
}

.dlg .alert-glasspane {
    -fx-padding: 40px 20px;
    -fx-effect: dropshadow(gaussian, $gp-dark-gray, 8, 0.5, 0, 0);

}
.dlg .alert-box {
    -fx-background-color: #f8d7da;;
    -fx-padding: 0;
}

.dlg .alert-box .title {
    -fx-font-size: 120%;
    -fx-padding: 3 5;
}
.dlg .alert-box > * {
    -fx-padding: 3px;
    -fx-background-color: #ff7777;
}

.dlg .alert-box ScrollPane {
    -fx-background-color: derive(#f8d7da, 10%);
}

.dlg .alert-box ScrollPane MDFXNode {
    -fx-background-color: derive(#f8d7da, 10%);
    -fx-padding: 20;
}

.dlg .alert-box Button {
    -fx-background-color: transparent;
}

.dlg .alert-dismiss {
    -fx-background-color: transparent;
    -fx-border-color: transparent;
    -fx-pref-width: 2em;
    -fx-pref-height: 2em;
    -fx-min-width: 2em;
    -fx-min-height: 2em;
    -fx-max-width: 2em;
    -fx-max-height: 2em;
    -fx-padding: 0;
    -fx-text-alignment: center;
    -fx-border: none;
}

.dlg .alert-dismiss:hover {
    -fx-background-color: $gp-light-gray;
    -fx-background-radius: 50%;
    -fx-effect: none;
}

.dlg .header {
    -fx-fill-width: true;
    -fx-spacing: 5;
    -fx-padding: 15;
    -fx-background-color: $gp-light-gray;
    -fx-background-insets: 0 0 4 0;
    -fx-effect: dropshadow(gaussian, #ccc, 4, 0, 0, 4);
}

.dlg .helpline {
    -fx-fill: $gp-medium-gray;
    -fx-font-size: 80%;
    -fx-font-weight: normal;
}

.hide {
  visibility: hidden;
  -fx-max-width: 0;
}